We have a WebDAV site that runs on IIS. From PowerShell we try to download a folder info
Get-ChildItem \\webserver@SSL\davwwwroot\webdav\Folder1\Folder2 -Name
It says
'\\webserver@SSL\davwwwroot\webdav\Folder1\Folder2' because it does not exist. At GetWebDAVFolderContents.ps1:33 char:10 + $items = Get-ChildItem $url -Name + ~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (\\webserver@SSL\...der1\Folder2:String) [Get-ChildItem], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
The folder does exist. The very strange things: we start the File Explorer on that client PC, enter an URL like https://inside.mycompany.com/it/site
which is a WebDAV site on our company's SharePoint site, then it asks for a login. After successful login to this site, the PowerShell script begins to work, drops no error anymore, and can download the Folder1\Folder2 info from our WebDAV site.
Why? How can I avoid to manually enter a login information to another site to get this script work? Is it because our WebDAV site is not correctly configured under the IIS?
\\webserver\davwwwroot\webdav\Folder1\Folder2
– Mathias R. Jessen