PowerShell: Profile
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
$PSHOME\Profile.ps1
- All Users, Current Host
$PSHOME\Microsoft.PowerShell_profile.ps1
- Current User, All Hosts
$Home\Documents\PowerShell\Profile.ps1
- Current user, Current Host
$Home\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
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

Start PowerShell Without Loading Profile
pwsh -NoProfile
Show PowerShell Command-Line Options
pwsh -h
or
pwsh -?