Powershell-在internetexplorer.application comobject中调用sharepoint功能区命令

Powershell-在internetexplorer.application comobject中调用sharepoint功能区命令,powershell,internet-explorer,sharepoint,com,ribbon,Powershell,Internet Explorer,Sharepoint,Com,Ribbon,我有一个powershell脚本,需要作为UNC路径访问sharepoint文档库-到目前为止,不可能可靠地编写该脚本,因为UNC路径的唯一工作方式是直接通过windows资源管理器访问它-它在后台调用必要的WebDAV,似乎将路径缓存在某个位置它现在通过测试路径,复制项等方式工作(我尝试使用System.Net.WebClient和调用WebRequest来模拟这一点,但它们似乎不像Windows资源管理器所做的那样) 那么,有人知道如何让powershell脚本调用在您单击sharepoin

我有一个powershell脚本,需要作为UNC路径访问sharepoint文档库-到目前为止,不可能可靠地编写该脚本,因为UNC路径的唯一工作方式是直接通过windows资源管理器访问它-它在后台调用必要的WebDAV,似乎将路径缓存在某个位置它现在通过
测试路径
复制项
等方式工作(我尝试使用
System.Net.WebClient
调用WebRequest
来模拟这一点,但它们似乎不像Windows资源管理器所做的那样)

那么,有人知道如何让powershell脚本调用在您单击sharepoint功能区上的
Library>openwithexplorer
时运行的命令吗

我有以下代码在PS中打开SP文档库:

$oIE=new-object -com internetexplorer.application
$oIE.navigate2("http://uk.sharepoint.mydomain.local/sites/mycompany/myteam/Shared Documents/Reports")
while ($oIE.busy) {
    sleep -milliseconds 50
}
$oIE.visible=$true
在页面源代码中,我看到了与使用资源管理器打开相关的以下内容:

{'Command':'OpenWithExplorer','ClickScript':'CoreInvoke\\u0028\\u0027NavigateHttpFolder\\u0027,\\u0027http:\\\\u002f\\\\u002fuk.sharepoint.mydomain.local\\\\u002fsites\\\\u002fmycompany\\\\u002fmyteam\\\\u002fShared Documents\\u0027, \\u0027_blank\\u0027\\u0029;','HiddenScript':'!\\u0028SupportsNavigateHttpFolder\\u0028\\u0029\\u0029','LabelText':'Open with Windows Explorer','Description':'Drag and drop files into this library.'}

是否可以使用CSOM+PowerShell访问库?或者这个脚本可能对你有帮助:@Shawn CSOM看起来很有趣,我会尝试一下!