I hereby claim:
- I am joeyaiello on github.
- I am joeyaiello (https://keybase.io/joeyaiello) on keybase.
- I have a public key whose fingerprint is 1E0E 562B C495 DB7D 1AF5 4B17 9BE4 2B0D E553 F93C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<# | |
.SYNOPSIS | |
Fans of (Linux/UNIX) GNU findutils' locate will appreciate Invoke-Locate, which provides similar functionality. "locate" and "updatedb" aliases are automatically created. | |
.DESCRIPTION | |
This script was made in the spirit of GNU locate. While the name of this script is Invoke-Locate, it actually creates two persistent aliases: locate and updatedb. A fresh index is automatically created every 6 hours, updatedb can be used force a refresh. Indexes generally takes less than three minutes. Performing the actual locate takes about 300 milliseconds. Invoke-Locate supports both case-sensitive, and case-insensitive searches, and is case-insensitive by default. | |
locate queries a user-specific SQLite database prepared by updatedb (Task Scheduler) and writes file names matching the pattern to standard output, one per line. Since the back-end is SQL, SQL "LIKE" syntax can be used for the search pattern (ie % and _). Asterisks are automatically translated to % for people who are used to searching with |
# Use shortcode to find latest TechNet download site | |
$confirmationPage = 'http://www.microsoft.com/en-us/download/' + $((invoke-webrequest 'http://aka.ms/wmf5latest' -UseBasicParsing).links | ? Class -eq 'mscom-link download-button dl' | % href) | |
# Parse confirmation page and look for URL to file | |
$directURL = (invoke-webrequest $confirmationPage -UseBasicParsing).Links | ? Class -eq 'mscom-link' | ? href -match "Win8.1AndW2K12R2-KB\d\d\d\d\d\d\d-x64.msu" | % href | select -first 1 | |
# Download file to local | |
$download = invoke-webrequest $directURL -OutFile $env:Temp\wmf5latest.msu | |
# Install quietly with no reboot | |
if (test-path $env:Temp\wmf5latest.msu) { | |
start -wait $env:Temp\wmf5latest.msu -argumentlist '/quiet /norestart' | |
} |
# Grab this first: https://play.google.com/store/apps/details?id=tech.ula | |
# I used Debian 9, not sure if Ubuntu or any of the others work as well | |
sudo apt-get install '^libssl1.0.[0-9]$' libunwind8 libicu57 -y | |
cd ~ | |
wget https://github.com/PowerShell/PowerShell/releases/download/v7.0.0-preview.3/powershell-7.0.0-preview.3-linux-arm64.tar.gz | |
mkdir powershell | |
tar -xvf powershell-7.0.0-preview.3-linux-arm64.tar.gz -C powershell | |
./powershell/pwsh |
# These are the demos I delivered at Ignite for BRK3179 - PowerShell 7 | |
# Not all of them are intended be run as-is, as they may require some dependency | |
# or be intended to showcase a more complex point (e.g. the AzVM example on &&) | |
# Those that were executed in the presentation were run with 7.0-preview.5 on the latest Windows 10 | |
#region ETW Provider Definitions | |
$Providers = @("OAlerts","PowerShellCore/Operational","Microsoft-Windows-WMI-Activity/Operational","Microsoft-Windows-WLAN-AutoConfig/Operational","Microsoft-Windows-Wired-AutoConfig/Operational","Microsoft-Windows-WinRM/Operational","Microsoft-Windows-Winlogon/Operational","Microsoft-Windows-WinINet-Config/ProxyConfigChanged","Microsoft-Windows-WindowsUpdateClient/Operational","Microsoft-Windows-WindowsSystemAssessmentTool/Operational","Microsoft-Windows-Windows Firewall With Advanced Security/Firewall","Microsoft-Windows-Windows Defender/Operational","Microsoft-Windows-WFP/Operational","Microsoft-Windows-WebAuthN/Operational","Microsoft-Windows-W |