我正在尝试使用Start-CMSoftwareUpdateDeployment
cmdlet将软件更新组部署到现有集合。
PS WHO:\> Start-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName "Update Group - Microsoft Updates" -CollectionName `
Eval_OSUpdates -DeploymentType Required -SendWakeUpPacket $true -AllowRestart $true -PersistOnWriteFilterDevice $true `
-DownloadFromMicrosoftUpdate $true -DeploymentName "Evaluation Deployment - Update Group - Microsoft Updates" `
-UserNotification DisplayAll -RestartWorkstation $false -AllowUseMeteredNetwork $true
给出了所有必需的参数,但是我在执行时收到以下错误:
Start-CMSoftwareUpdateDeployment : ConfigMgr Error Object:
instance of SMS_ExtendedStatus
{
Description = "One or more updates are present for which a EULA exists which hasn't been approved.";
ErrorCode = 1078462208;
File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\sspciassignment.cpp";
Line = 361;
Operation = "PutInstance";
ParameterInfo = "";
ProviderName = "ExtnProv";
StatusCode = 2147749889;
};
At line:1 char:1
+ Start-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName "SoM Update Group - Mi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Microsoft.Confi...ploymentCommand:StartSoftwareUpdateDeploymentCommand) [Start-CMSoftware
UpdateDeployment], WqlQueryException
+ FullyQualifiedErrorId : UnhandledExeception,Microsoft.ConfigurationManagement.Cmdlets.Sum.Commands.StartSoftwareUpdateDeployment
Command
我非常确定我知道需要接受EULA的更新,但是在尝试使其自动化时,最好以编程方式接受任何EULA,并且过程中没有手动步骤。
我看到了cmdlet Get-SoftwareUpdateLicense
,但所有操作只是返回一个带血的EULA 字符串,没有人读过。
今天离我很近,我找到了有关AcceptEULA方法的MSDN文章,但我不知道如何在更新中调用它,因为更新的类型为SMS_SoftwareUpdate,但是当我通过管道传递到Get-Member
和时,该方法未列出当然只是试图随意地调用该方法会引发错误。
总而言之,这就是我要坚持的地方:我不知道如何在特定的SMS_SoftwareUpdate对象上调用此WMI方法,如果有区别的话,请使用powershell。