I am trying to get folders and files from the root of a UNC path name. I am using Get-ChildItem
.
I can get results from a subfolder via the UNC path, but not the root folder. If run the command Get-ChildItem \\sf1\user1
from the command line, results are returned.
Directory: \\sf1\user1 Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 11/14/2013 3:40 PM 1.ISGROUP
When I try to execute Get-ChildItem \\sf1
from the command line I get errors.
Get-ChildItem : Cannot find path '\\sf1' because it does not exist. At line:1 char:1 + Get-ChildItem \\sf1 + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (\\sf1:String) [Get-ChildItem], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
Any suggestions on how to get folders and files from the root of a UNC path?