Get around 260 char limit

So I have a script that finds all shortcuts on my file server and removes them. And F***ing loads of files paths are over the 260 char limit. Users huh?

Anyways, can anyone suggest a workaround for the 260 char limit.

$share = Get-ChildItem '<filePath>' -Recurse | Where { $_.PsIsContainer -eq $False } $share | Remove-Item -Include "*.lnk" -ErrorAction SilentlyContinue 

submitted by /u/rick_D_K
[link] [comments]

Leave a Reply