DevOps

Change PowerShell Default Directory from Start Menu to Home Folder

Set PowerShell to start in user home directory ($HOME) instead of System32 when launched via Windows Start menu search on Windows 11. Use profiles, edit shortcuts, or pin to taskbar for quick access to personal scripts and folders.

4 answers 1 view

How to change the default starting directory for PowerShell launched from Windows Start menu search to the user’s home folder?

When launching PowerShell via the Windows Start menu search (Win key, type ‘powershell’, Enter), it defaults to C:\WINDOWS\System32. I want it to start in the user’s home directory for easy access to personal scripts, similar to bash/zsh on macOS.

Working on Windows 11 Pro 25H2. Note: I know about right-clicking a folder and selecting ‘Open in PowerShell terminal’, but prefer the quick search launch method.

To change the PowerShell default directory when launching from the Windows Start menu search to your home folder ($HOME or %USERPROFILE%), the quickest fix is editing the PowerShell shortcut properties in the Start menu folder—set “Start in” to %USERPROFILE%. For a more permanent solution across all launches, create a PowerShell profile script that runs Set-Location $HOME at startup. Both work seamlessly on Windows 11 Pro 25H2 without needing admin rights every time.


Contents


Why PowerShell Starts in System32

Ever hit Win key, type “powershell,” and bam—you’re dumped into C:\WINDOWS\System32? It’s by design. Microsoft set that as the default working directory for security reasons; it keeps scripts from accidentally messing with user files right away. But for daily use, especially if you’re scripting personal stuff, starting in your home directory makes way more sense—like bash dropping you into ~ on Linux or macOS.

The good news? You don’t need to hack the registry or rewrite system files. Simple tweaks to profiles or shortcuts handle it. And on Windows 11 Pro 25H2, everything’s current—no compatibility headaches.


Method 1: Use a PowerShell Profile for Global Change

Profiles are PowerShell’s secret weapon. They’re scripts that load every time you start a session, perfect for setting your default PowerShell directory once and forgetting it.

First, check if you have a profile: Open PowerShell (anyway) and run Test-Path $PROFILE. No? Create one with New-Item -Path $PROFILE -Type File -Force. That makes Microsoft.PowerShell_profile.ps1 in Documents\PowerShell (or the older WindowsPowerShell spot).

Open it in Notepad: notepad $PROFILE. Add this line:

Set-Location $HOME

Save, restart PowerShell via Start search, and you’re home. Why $HOME? It’s your user folder—C:\Users\YourName—and it expands reliably.

But execution policy might block it. Fix with Set-ExecutionPolicy RemoteSigned -Scope CurrentUser (one-time). Now, every launch, including Start menu, obeys. Profiles affect all PowerShell instances, which is great unless you use -NoProfile for clean sessions.

This method shines for consistency. As folks on Stack Overflow point out, it’s the go-to for overriding System32 without touching shortcuts.


Method 2: Edit the Start Menu PowerShell Shortcut

Want a targeted fix just for Start menu searches? Dive into the shortcut itself. No profile needed—this changes the PowerShell starting folder only for that launch method.

Navigate to %APPDATA%\Microsoft\Windows\Start Menu\Programs\Windows PowerShell (paste into Explorer). Right-click PowerShell.lnk (or Windows PowerShell.lnk) → Properties.

On the Shortcut tab, find “Start in.” Clear the System32 path and enter %USERPROFILE%. Hit OK. Test: Win → “powershell” → Enter. Boom, home sweet home.

Pro tip: If it’s pinned or you have multiple versions (like PowerShell 7), edit those too. This survives updates on Windows 11 25H2.

Users on Super User swear by this for quick wins—it’s visual, no scripting required.


Method 3: Pin PowerShell to Taskbar or Start and Customize

Start menu search pulls from pinned items or defaults. Pinning gives you control.

Right-click Start → Terminal (or search PowerShell) → Pin to taskbar. Then right-click the pinned icon → Properties. Same drill: Shortcut tab, “Start in” to %USERPROFILE%.

For Start menu pinning: Search PowerShell, right-click → Pin to Start. Customize via the same properties path.

Taskbar pins sync better across sessions. And if you’re on Windows Terminal (default in 11), set its startup directory similarly in settings.json: "startingDirectory": "%USERPROFILE%".

This keeps your workflow snappy—search launches the pinned one with your custom PowerShell directory.


Advanced Tweaks for PowerShell Directory

Need more? Set a HOME environment variable system-wide.

Hit Win+R → sysdm.cpl → Advanced → Environment Variables. Under User variables, New: Variable=HOME, Value=%USERPROFILE%. Restart explorer.exe or log out.

In profiles, add (Get-PSDrive -Name FileSystem).Home = $HOME for ~ alias support.

For PowerShell 7 (pwsh.exe), profiles live in Documents\PowerShell\profile.ps1. Check paths with $PROFILE | Format-List -Force.

Or launch with args: Win → powershell.exe -WorkingDirectory $HOME. But shortcuts beat typing.

Bloggers like those at .matrixpost.net mix profiles with env vars for bulletproof setups.


Troubleshooting Common Issues

Profile not loading? Run echo $PROFILE—ensure it’s the right path (AllUsers vs CurrentUser). Windows 11 uses Documents\PowerShell now.

Shortcut changes ignored? Run as admin once, or check for multiple .lnk files. UAC might reset “Start in.”

Still in System32? Bypass with cd $HOME alias in profile: Set-Alias cdhome Set-Location; function prompt { cdhome; "PS $PWD> " }. Hacky, but works.

Execution blocked? Get-ExecutionPolicy → RemoteSigned. For scripts, Unblock-File first.

Test on 25H2: Updates don’t break these. If Terminal-integrated, edit its JSON.


Sources

  1. Stack Overflow — How to set PowerShell’s default directory via profiles and shortcuts: https://stackoverflow.com/questions/32069265/how-do-you-set-powershells-default-directory
  2. Super User — Setting HOME in PowerShell with environment variables and shortcut edits: https://superuser.com/questions/82053/setting-home-in-powershell
  3. .matrixpost.net — Detailed guide to PowerShell profiles for default working directory: https://blog.matrixpost.net/set-powershells-default-working-directory/

Conclusion

Pick shortcut edits for Start menu specificity or profiles for everywhere—both land you in $HOME fast on Windows 11. Profiles edge out for power users; shortcuts win for simplicity. Test one, tweak as needed, and ditch System32 forever. Your scripts will thank you.

J

To change the default PowerShell starting directory when launched from the Windows Start menu, create a PowerShell profile by running New-Item -path $profile -type file -force in an admin PowerShell session. Edit the Microsoft.PowerShell_profile.ps1 file located in Documents\WindowsPowerShell (or PowerShell folder), adding Set-Location $HOME or %USERPROFILE% to set the user’s home directory. First, set the execution policy with Set-ExecutionPolicy RemoteSigned if needed.

Alternatively, locate the PowerShell shortcut in %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell, right-click Properties, and set ‘Start in’ to $HOME or %USERPROFILE%. Pin to the taskbar and update properties there for Windows 11 Start menu search launches.

G

Set PowerShell’s default directory by creating a profile.ps1 in C:\Users\<user>\Documents\WindowsPowerShell, adding Set-Variable HOME "$env:HOMEDRIVE$env:HOMEPATH" -Force and (get-psprovider 'FileSystem').Home = $HOME for consistent ~ shortcut behavior.

For Start menu launches, pin PowerShell to the taskbar, right-click → PropertiesShortcut tab, and set ‘Start in’ to %USERPROFILE% or desired path. For system-wide effect, add a HOME environment variable via sysdm.cplAdvancedEnvironment Variables, then restart PowerShell.

Marcus Rath / IT Consultant

Create a PowerShell profile using New-Item -path $profile -type file -force, then edit %USERPROFILE%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 to include Set-Location C:\Users$env:USERNAME or $HOME for default starting directory on every session, overriding C:\WINDOWS\System32.

Verify profile paths with $PROFILE | fl -Force and check existence via Test-Path $PROFILE.CurrentUserCurrentHost. This method ensures consistent directory across all launches, including Start menu search, and is preferred over shortcut edits for global application.

Authors
J
Software Developer
L
Software Developer
A
Developer
N
Systems Administrator
G
Software Developer
U
IT Professional
C
PowerShell Developer
Marcus Rath / IT Consultant
IT Consultant
Sources
Stack Overflow / Q&A Platform
Q&A Platform
Super User / Q&A Platform
Q&A Platform
.matrixpost.net / Technology Blog
Technology Blog
Verified by moderation
Moderation
Change PowerShell Default Directory from Start Menu to Home Folder