Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.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
SCCM Powershell脚本包_Powershell_Command Line_Configurationmanager_Sccm - Fatal编程技术网

SCCM Powershell脚本包

SCCM Powershell脚本包,powershell,command-line,configurationmanager,sccm,Powershell,Command Line,Configurationmanager,Sccm,我在SCCM 2012中创建了一个包,该包应该部署并运行powershell脚本。我已经看了以前在这里的帖子,但没有任何信息 在程序命令行中,我有以下命令: powershell.exe -ExecutionPolicy Bypass -force -WindowStyle Hidden .\PowershellUpdateScript.ps1 我将测试组作为目标,并将其设置为立即部署。但是,当我检查部署状态时,它显示为状态“正在进行”和描述“已接收”。这样已经两个多小时了。我不确定问题出在哪

我在SCCM 2012中创建了一个包,该包应该部署并运行powershell脚本。我已经看了以前在这里的帖子,但没有任何信息

在程序命令行中,我有以下命令:

powershell.exe -ExecutionPolicy Bypass -force -WindowStyle Hidden .\PowershellUpdateScript.ps1
我将测试组作为目标,并将其设置为立即部署。但是,当我检查部署状态时,它显示为状态“正在进行”和描述“已接收”。这样已经两个多小时了。我不确定问题出在哪里

我知道有脚本功能,而且非常方便,但是客户端powershell版本至少需要是版本3。讽刺的是,该软件包将更新客户端powershell版本


如果您有任何建议或建议,我们将不胜感激。

由于您正在更新powershell版本,因此您应该下载powershell版本的MS更新包,而不是使用powershell脚本

然后可以使用wusa.exe命令部署更新。然后使用此ps命令作为检测方法

获取WmiObject Win32_QuickFixEngineering-过滤器“HotFixID='KB'