Printed 2017/08/17 11:19PM

Change User Desktop Folder Path by Using PowerShell

By Sedat Salman, 2011/08/14

We could change your desktop folder location by using the following powershell script. Actually we need to change values of specific registry keys , because of this you need to restart the computer after executing the script.
Change new path variable to your custom folder path, execute script using powershell and restart the computer.

$newPath = 'D:\MyNewDesktopLocation'  
$key1 = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"  
$key2 = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"  
set-ItemProperty -path $key1 -name Desktop $newPath  
set-ItemProperty -path $key2 -name Desktop $newPath


Copyright © 2002-2017 Redgate. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.