Skip to content

Instantly share code, notes, and snippets.

@brentini
Last active May 21, 2022 21:41
Show Gist options
  • Save brentini/9817013 to your computer and use it in GitHub Desktop.
Save brentini/9817013 to your computer and use it in GitHub Desktop.
Auto-load scripts on PowerShell startup #wordpress
#Auto-load scripts on PowerShell startup
#Add this to C:\Users\%username%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
# directory where my scripts are stored
$psdir="D:\Documents\Powershell\Scripts\autoload"
# load all 'autoload' scripts
Get-ChildItem "${psdir}\*.ps1" | %{.$_}
Write-Host "Custom PowerShell Environment Loaded"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment