http://www.sqlservercentral.com/blogs/sqlservertips/2011/08/14/change-user-desktop-folder-path-by-using-powershell/

Printed 2014/04/21 04:35AM

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-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.