PowerShell: Profile

By Xah Lee. Date: . Last updated: .

PowerShell profile are files PowerShell loads when starting up. It can contain your own functions, alias, or other customization.

Profile Location

All Users, All Hosts
All Users, Current Host
Current User, All Hosts
Current user, Current Host

Just create the file, and add Function or Alias or other PowerShell code to it.

Profile Path Variable

Profile paths are stored in the variable $PROFILE. In particular, in the NoteProperty.

To list profile paths, do

$PROFILE | Get-Member -Type NoteProperty | Format-List
PowerShell profile 2022-06-13 b4gVY
PowerShell profile 2022-06-13

Start PowerShell Without Loading Profile

pwsh -NoProfile

Show PowerShell Command-Line Options

pwsh -h


pwsh -?

PowerShell: Profile and Script