Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WebDAV、Powershell和Windows-奇怪的错误和行为_Powershell_Iis_Webdav - Fatal编程技术网

WebDAV、Powershell和Windows-奇怪的错误和行为

WebDAV、Powershell和Windows-奇怪的错误和行为,powershell,iis,webdav,Powershell,Iis,Webdav,我们有一个在IIS上运行的WebDAV站点。我们尝试从PowerShell下载文件夹信息 Get-ChildItem \\webserver@SSL\davwwwroot\webdav\Folder1\Folder2 -Name 上面说 '\\webserver@SSL\davwwwroot\webdav\Folder1\Folder2' because it does not exist. At GetWebDAVFolderContents.ps1:33 char:10 + $items

我们有一个在IIS上运行的WebDAV站点。我们尝试从PowerShell下载文件夹信息

Get-ChildItem \\webserver@SSL\davwwwroot\webdav\Folder1\Folder2 -Name
上面说

'\\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 '\\webserver@SSL\davwwwroot\webdav\Folder1\Folder2',因为它不存在。 在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 文件夹确实存在。非常奇怪的事情:我们在客户端PC上启动文件浏览器,输入一个URL,如
https://inside.mycompany.com/it/site
这是我们公司SharePoint网站上的WebDAV网站,然后要求登录。成功登录到此站点后,PowerShell脚本开始工作,不再出现错误,并且可以从我们的WebDAV站点下载Folder1\Folder2信息


为什么??如何避免手动输入登录信息到另一个站点以使脚本正常工作?是因为我们的WebDAV站点在IIS下没有正确配置吗?

碰巧需要启动名为“WebClient”的本地服务。默认情况下,它是“手动”启动“触发器”。看起来powershell的方式不会触发服务启动,但explorer的方式会。在继续启动时,powershell脚本突然开始工作。解决方案是将服务开始更改为自动,并且“直到现在它仍然可以工作。

您的Web服务器名为“SSL”?不,它的名称为“webserver”。然后将目标路径更改为
\\webserver\davwwroot\webdav\Folder1\Folder2
它说“找不到路径,因为它不存在”。使用我的url(@ssl)它仍在工作。