

Otherwise, you can actually get to the paths longer than 260 characters by making your call to the unicode version of Windows API. Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1 #GPEdit location: Configuration>Administrative Templates>System>FileSystem This policy can be enabled using the following snippet.
#Long path tool full windows 10
Windows 10 / Windows server 2016 (Build 1607 or newer) There is a local policy that is now available since Windows anniversary update. Am I doing something incorrectly? Why is the new PSDrive throwing PathTooLong when I am creating a drive at the location where the path is too long? + CategoryInfo : ReadError: (\\svr01\Dep.\Fibrebond ECO\:String), PathTooLongException The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. PS C:\> cd long1:ĭir : The specified path, file name, or both are too long. However, after creating a new PSDrive I am still getting PathTooLong Exceptions. So I create a new PSDrive using this cmdlet: new-psdrive -Name "long1" -PSProvider FileSystem -Root $ The $folderErrors variable is correctly capturing all the FileTooLong exceptions so I want to create new PSDrives using the long Paths in order to recurse those long paths. NOTE: $rootFolder in my case is a network share. I am recursing a deep folder structure in order to retreive all folder paths like so: $subFolders = Get-ChildItem $rootFolder -Recurse -Directory -ErrorVariable folderErrors | Select-Object -ExpandProperty FullName
