Last active
May 21, 2022 21:41
-
-
Save brentini/9817013 to your computer and use it in GitHub Desktop.
Auto-load scripts on PowerShell startup #wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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