Created
December 24, 2020 18:08
-
-
Save stef-k/2c8e515fe8c8d12c6317ca786c8c7915 to your computer and use it in GitHub Desktop.
Revisions
-
stef-k created this gist
Dec 24, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ # Removes all files and folders in user's Desktop except shortcuts # Warning !!! # Remove the -WhatIf to actually delete the file and directory objects !!! # Remove-Item "$home\Desktop\*" -Recurse -Exclude "*.lnk" -WhatIf Remove-Item "$home\Desktop\*.*" -Recurse -Exclude "*.lnk" -WhatIf