neolateral

programming, drawing, photograpy etc.

I didn't know creating a powershell profile was so easy. I'm just going to document this in case I need it again.

The $profile environment variable holds the value of the powershell profile file. This file is sourced when a new powershell session is started - whether normal or elevated.

Here's the command to create a new profile file. In windows this will usually create a folder named <HOME>\Documents\WindowsPowerShell, where <HOME> is your home folder. A file named Microsoft.PowerShell_profile.ps1 will be created in this folder.

New-Item $profile -Type File -Force

One of the few useful things one can add in the powershell file are commonly used functions, and command aliases for oft-used commands.