我编写了powershell脚本,它从sharepoint安装中提取文件。当我执行这个脚本时,我看到fileDialog,我需要在其中选择路径。
$path="C:\Script\Download\SharePointServer.exe "
$arguments = "/extract "
start-process $path $arguments -wait -verb runas
但是当我执行这个脚本时,我看到错误:用法:/ extract:path,提取包的内容......
$path="C:\Script\Download\SharePointServer.exe "
$arguments = "/extract ""C:\Script\Download"""
start-process $path $arguments -wait -verb runas
那么它是如何解决的?
答案 0 :(得分:1)
你快到了:
$path="C:\Script\Download\SharePointServer.exe"
$arguments = "/extract C:\Script\Download"
& $path $arguments;
希望它有效;)