Créer et éditer
$PROFILE
if (!(Test-Path $PROFILE)) { New-Item $PROFILE -Force }
notepad $PROFILE
. $PROFILE # recharger sans rouvrir
Exemple
Set-Alias np notepad
function proj { Set-Location "$HOME\Projets" }
function maj { winget upgrade --all --accept-source-agreements }
Set-PSReadLineOption -PredictionSource History -PredictionViewStyle ListView
function prompt { "PS $(Split-Path -Leaf (Get-Location))> " }PowerShell 5 et 7 ont des profils distincts. Le profil est un script : l'ExecutionPolicy doit l'autoriser. Pour une invite très visuelle : Oh My Posh.