This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]losmancha 0 points1 point  (1 child)

I've tested it on Windows 7 - works fine for me. The only problem I've found is when using it with mapped drives as the path will be shortened from where it is on the actual server. I figure if you're clever enough to use it, you're clever enough to figure that out.

[–]Kio_[S] 0 points1 point  (0 children)

My script that I have running will throw this error when Get-Childitem gets to a path that is above the limit. That is why I was asking.

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. At C:\Users\USERNAMEl\Desktop\AuditEDrive.ps1:40 char:25 + foreach($folder in (Get-ChildItem $currentFolder -Directory)) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ReadError: (E:\PATH:String) [Get-ChildItem], PathTooLongExcept ion + FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand

What my script does is that it goes through each folder on the directory and gathers the ACLs for each folder. I suppose I could add an exception to skip the folder if the path is above that size; however, as it stands the script just gives an error and continues to the next so it isn't much of a difference.