Skip to content
  • 530.303.7973
  • info@wheelerwire.com
  • Home
  • About
  • Contact Us
  • Home
  • About
  • Contact Us
More Information

WheelerWire

  • Home
  • Powershell Profile

Follow On

[ww_sociallinks]

Say Thanks / Buy me A beer

If any of my work was useful to you please consider sending me a thank you



by wheelertFeb 10, 2021

Powershell Profile

Some custom Powershell scripts and settings I like to have available for all Powershell sessions. To do this I add the following to my Powershell profile so it loads all scripts in a directory when opening. First create a directory to store the script files. I use c:\users\<USER>\ProfileScripts now add your scripts to that directory. For some starting scripts you can download a few of mine here PSProfile on Github

To edit the Powershell profile open a Powershell prompt and type:

notepad $profile

Enter the following and update USER to be your username

#load scripts
$psdir = "C:\Users\<USER>\ProfileScripts"

Set-Location $psdir

#autoload script directory

$cnt = (Get-ChildItem $psdir).Count

For($i = 0; $i -le $cnt; $i++)

{ 

    Write-Progress -Activity "Loading Scripts" -status "Loading $i" -percentComplete ($i / $cnt*100)
    
}

Get-ChildItem "${psdir}\*.ps1" | %{.$_}

Set-Location c:\users\<USER>

Write-Host -foregroundcolor green "Custom Powershell Environment Loaded"

Now save and open a new powershell prompt and all ps1 files in the ProfileScripts directory will be loaded.

wheelert

Linux webserver backup using RClone

Previous post

IPTracker (Python)

Next post

Leave a Reply Cancel Reply

Your email address will not be published. Required fields are marked *

© 2026 - 2027 | All rights reserved by wheelerwire