Hi,
I am writing a simple PowerShell script to dump all the folders/files permissions under a top level directory via its UNC path. I notice if I don't have access to a subdirectory, it errors out and continues but the path shown in the error message is partial (missing the middle part). Is there a way to show the full path of the directory/file that I am lack of permission? For example, below it does not show the full path for "\fileserver\co...gment Reporting".
Get-ChildItem : An unexpected network error occurred.
At C:\script\dumpdirperm.ps1:10 char:15
+ ... olderPath = Get-ChildItem -Directory -Path $PATH_TOP -Recurse -Force ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ReadError: (\\fileserver\co...gment Reporting:String) [Get-ChildItem], IOException
+ FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand
Thank you.