Whenever I open PowerShell on Windows, it starts in `C:WindowsSystem32` instead of my user directory, such as `C:Usersmyname`. I know I can run `cd ~` manually, but I'd like PowerShell to open in the preferred directory automatically. What's the best way to configure this?
4 Answers
You can also use your PowerShell profile. Run `notepad $PROFILE`, add `Set-Location 'C:Usersmyname'`, save the file, and open a new PowerShell window. However, this runs for every session that loads the profile, so it may override a directory you intentionally launched PowerShell from. `Push-Location 'C:Usersmyname'` is another option, since `Pop-Location` can return you to the previous directory.
One caveat: some enterprise systems block PowerShell scripts, which can prevent profiles from loading. In that situation, changing the Windows Terminal profile or shortcut’s **Start in** setting is a better approach.
Also check whether PowerShell is being launched with elevated permissions. A normal user session commonly starts in the user directory, while an administrator session may start in `C:WindowsSystem32`. If you are already launching it normally, use the Windows Terminal or shortcut setting instead.
If you launch PowerShell through Windows Terminal, edit that PowerShell profile’s starting directory and set it to something like `C:Usersmyname`. This is usually the cleanest option because it changes the location for that particular terminal profile without affecting every PowerShell session.
If you start PowerShell from a regular shortcut, open the shortcut’s properties and change the **Start in** directory to your desired path. That controls the working directory when the shortcut launches PowerShell.

That worked for me. I used `notepad $PROFILE`, added the location command, and new sessions now start in my user folder.