Site icon Eric Juden

Add Custom Scripts to Your PowerShell Profile

I’ve recently started doing some work with Windows PowerShell. One problem I wanted to solve was placing my scripts in source control and having them in a non-standard folder. Below is a bit of code you can put in your Microsoft.PowerShell_profile.ps1 file to look for all .ps1 files in a given directory. Just be sure to change the folder in the code below to your PowerShell code folder and all will be good.

See the gist on github.

Exit mobile version