I need to wipe user’s desktops contents completely. That line was easy.
My plan was to copy the short cuts to recreate the shortcuts that should be there by simply copying them from a network location.
Copy-Item -Path domainnetlogonshortcuts -Destination c:usersuserdesktop
This seems to attempt my solution because it returns this error for every .lnk file (using a Word example):
Copy-Item : Illegal characters in path.
CategoryInfo : InvalidArgument: (Word Shortcut.lnk:FileInfo) [Copy-Item], ArgumentException
Should I try a different method or am I missing something obvious with my command?
submitted by /u/suphater
[link] [comments]
The post Copy-Item doesn’t seem to like .lnks appeared first on How to Code .NET.