Comment content for a PowerShell profile
Learn some common content to place in PowerShell profiles.
John Savill
March 11, 2016
1 Min Read
Q. What is common content to place in the PowerShell profile?
A. There is no fixed content required in a PowerShell profile. The content should be based on your requirements. Some common settings are to set environmental configurations, load modules, create aliases and modify the prompt. Below is some example content:
Set-Location c:#Set window colors and title$shell = $Host.UI.RawUI$shell.WindowTitle="John's PowerShell"$shell.BackgroundColor = "Black"$shell.ForegroundColor = "White"#Set the window size$size = $Shell.WindowSize$size.width=70$size.height=25$Shell.WindowSize = $size#Set the buffer sizes$size = $Shell.BufferSize$size.width=70$size.height=5000$Shell.BufferSize = $size#Load modules#Import-Module ....#Create a notepad aliasNew-Item alias:np -value c:windowssystem32otepad.exe#Clear the screenClear-Host
Each week, John Savill answers all of your toughest tech questions about the worlds of Windows Server, Azure, and beyond. Read his past IT advice here, and email your questions to [email protected].
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like