Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

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

https://social.technet.microsoft.com/Forums/lync/en-US/5bb8d044-ae62-44ce-a204-f0035131341d/getchilditem-the-specified-path-file-name-or-both-are-too-long-the-fully-qualified-file-name?forum=ITCG

CategoriesIT

Leave a Reply

Your email address will not be published.