The only way is to shorten the path. PowerShell does not have support for long paths.
Long Paths on a server are a very bad thing as they will continue to be headaches for all.
You can shorten the path by mapping a PowerShell drive at a midway point.
New-PSDrive -Name X -PSProvider FileSystem -Root \\server\share\folder1\folder2\folder3
Now you can use X: to access the shorter path.
The mapping will be removed when you exit PowerShell
Leave a Reply