Skip to content

Instantly share code, notes, and snippets.


Joey Aiello joeyaiello

View GitHub Profile
joeyaiello / brk3179_demos.ps1
Created Nov 22, 2019
BRK3179 - PowerShell 7 demo script
View brk3179_demos.ps1
# 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
# Grab this first:
# 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 ~
mkdir powershell
tar -xvf powershell-7.0.0-preview.3-linux-arm64.tar.gz -C powershell
joeyaiello / WMF5Latest.ps1
Created Oct 19, 2015 — forked from mgreenegit/WMF5Latest.ps1
Get latest WMF5 and quietly install, reboot suppressed
View WMF5Latest.ps1
# Use shortcode to find latest TechNet download site
$confirmationPage = '' + $((invoke-webrequest '' -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'
View Invoke-Locate.ps1
Fans of (Linux/UNIX) GNU findutils' locate will appreciate Invoke-Locate, which provides similar functionality. "locate" and "updatedb" aliases are automatically created.
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

Keybase proof

I hereby claim:

  • I am joeyaiello on github.
  • I am 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: