Mundy

IT Knowledge Base

User Tools

Site Tools


script_to_delete_non-profile_folders_in_users

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
script_to_delete_non-profile_folders_in_users [2017/10/24 17:13]
Dan Mundy
script_to_delete_non-profile_folders_in_users [2018/04/09 09:56] (current)
Line 18: Line 18:
         if ($x.Name -ne "​Default"​ -and $x.Name -ne "​Public"​){         if ($x.Name -ne "​Default"​ -and $x.Name -ne "​Public"​){
             if (!(Test-Path $moveto)) { New-Item -ItemType Directory $moveto }             if (!(Test-Path $moveto)) { New-Item -ItemType Directory $moveto }
-            Move-Item C:\Users\$x $moveto\$((Get-Date).ToString('​yyyymmdd'))-$x ;+            Move-Item C:\Users\$x $moveto\$((Get-Date).ToString('​yyyyMMdd'))-$x ;
         }         }
     }     }
  
 +
 </​file>​ </​file>​
script_to_delete_non-profile_folders_in_users.txt · Last modified: 2018/04/09 09:56 (external edit)