Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 780 Bytes

File metadata and controls

26 lines (20 loc) · 780 Bytes

PS Profiles

Explore: Home Basics

Precedence (↑ to ↓) Path
All Users, All Hosts $PsHome\Profile.ps1
All Users, Current Host $PsHome\Microsoft.PowerShell_profile.ps1
Current User, All Hosts $Home\Documents\Profile.ps1
Current User, Current Host $Home\Documents\WindowsPowerShell\Profile.ps1
Get-Help about_Profiles

Test-Path $profile.currentusercurrenthost
Test-Path $profile.alluserscurrenthost
Test-Path $profile.currentuserallhosts
Test-Path $profile.allusersallhosts


Test-Path $PROFILE
New-Item -ItemType File -Path $PROFILE -Force    # If ^ false
notepad $PROFILE
# nal ?? Get-Help
Set-ExecutionPolicy RemoteSigned CurrentUser    # Re-open terminal or source w/ `. $PROFILE`