If you work in PowerShell as much as I do and you have a dedicated folder where you run scripts, having to keep navigating to the folder can become a pain. By default, PowerShell will open up in the user that is logged in directory, below we can see that I am logged into this server as Administrator and thus PowerShell started in “C:\Users\Administrator”:

Quickly update the default startup location when opening powershell in server 2022

If you open up the properties page for Windows PowerShell, the “Start in” location is set to “%HOMEDRIVE%%HOMEPATH% as shown below:

Quickly update the default startup location when opening powershell in server 2022

We can change this, in the example below, I removed the “%HOMEPATH% option and applied the changes which will look like this:

Quickly update the default startup location when opening powershell in server 2022

When we launch PowerShell now, it will show the path as “C:\Windows\System32” as you can see below:

Quickly update the default startup location when opening powershell in server 2022

If the above path is not what you want, change it to where you want to start it when you launch PowerShell.

Hope it helps.

    wpChatIcon

    Discover more from Everything-PowerShell

    Subscribe now to keep reading and get access to the full archive.

    Continue reading