Skip to content

Instantly share code, notes, and snippets.

@maravedi
Created March 28, 2019 13:18
Show Gist options
  • Save maravedi/165224323dba350b8d8681686fd6c4a5 to your computer and use it in GitHub Desktop.
Save maravedi/165224323dba350b8d8681686fd6c4a5 to your computer and use it in GitHub Desktop.
Change your PowerShell Profile Path
# Keep in mind that this will change the path for shell:personal, which may adversely affect other applications that rely on this.
# Use this with caution, and make sure you remember what it was set to previously so that you can revert it if needed.
$OldValue = Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\' -Name Personal
# $OldValue
# Personal : C:\Users\maravedi
# You'll want to use the %USERPROFILE% value instead of hardcoding it, just to be consistent with the other entries for this key
$NewValue = '%USERPROFILE%\Box'
Set-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\' -Name Personal -Value $NewValue
# Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\' -Name Personal
# Personal : C:\Users\maravedi\Box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment