PowerShell is a powerful tool that can be used to manage your systems. One of the most important things you can do when using PowerShell is to configure your profile. This will help you work more efficiently and effectively with PowerShell. To configure your PowerShell profile, you first need to create a new instance of PowerShell. You can do this by running the following command: New-PSSession -Name “MyProfile” -ConfigurationFile “C:\Users\username\AppData\Local\Microsoft\WindowsPowerShell\profile1” Once you have created a new instance of PowerShell, you need to set up some basic settings. You should create a new file called “powershell.profile” and add the following content:

Default settings for the shell $profile = “C:\Users\username.local.powershell” # Add your own custom settings here $settings = [System.IO.File]::Open(“C:\Users\username.local.powershell\config\defaults”) if ($settings) { Write-Host “Setting up my custom profile…” $settings | Out-File $file } else { Write-Host “No such file or directory.” } # Start PowerShell $startup = New-Object System.IO.FileStream("./powershell") # Connect to the localhost (or any other host) and run the shell $cmd = New-Object System.IO.CommandLineParser() # Get the current working directory $current_directory = ($startup . FileName)


The first thing we need to check is whether or not a profile already exists. We can do this by opening a PowerShell window and typing:

Since our query returned “False” we are going to have to create a new profile. We’ll type the following in our PowerShell prompt:

You should get the following pop-up, and just click yes to proceed.

The profile script will now be created. It will be in the location following the “Directory:” output. When we browse to that location, the profile script will be there waiting for us to modify. Open the file named “Microsoft.Powershell_profile.ps1”

The profile will be empty, so we can fill it with any commands that we want to run. You can set the starting prompt location to the root directory by adding:

We can change the title of the PowerShell window to SysadminGeek by adding:

We can also change the window size and scrollback with the following:

The background and text coloring can also be changed with these entries:

You can put any scripts or aliases that you commonly use as well. We’ve included our alias for Notepad.exe

The final entry is included to clear everything from the PowerShell window, giving you a clean workspace:

All together, it looks like this:

After you’ve saved your profile, the next time you open PowerShell you will see all the changes made to your profile.

It’s pretty easy to customize your profile, and the more you use PowerShell, the more you will find yourself returning to add in new aliases and scripts that you need to run at startup.