执行命令时Powershell挂起

时间:2016-06-29 07:22:41

标签: powershell sccm

我正在测试通过powershell创建SCCM 2012应用程序部署类型,以下是我的命令正在运行。我成功地使用下面的代码行创建了部署类型

Add-CMDeploymentType -ApplicationName "PowerTest" -InstallationFileLocation "\\sccmserver\folder$\Powershell_Test\Sources\googlechromestandaloneenterprise.msi" -MsiInstaller -AutoIdentifyFromInstallationFile -ForceForUnknownPublisher $true -InstallationBehaviorType InstallForSystem -Language "English" -DeploymentTypeName 'Setup' -InstallationProgram "'code1.wsf' /SMSLaunch /foldername:Chrome 2.0.4'" 

但问题是当我添加以下参数时( -MaximumAllowedRunTimeMinutes 20 -EstimatedInstallationTimeMinutes 10 -LogonRequirementType YesOrNotUserLoggedOn )。当我点击回车时,它似乎无法执行。它不显示任何错误,但它只是不执行。我检查了帮助,下面的参数确实存在。或者是因为这些参数取决于您必须首先指定的其他参数集才能运行?

  -MaximumAllowedRunTimeMinutes 20 -EstimatedInstallationTimeMinutes 10 -LogonRequirementType WhetherOrNotUserLoggedOn

1 个答案:

答案 0 :(得分:0)

知道了。参数 -MaximumAllowedRunTimeMinutes 实际上是 Set-CMDeploymentType cmdlet的一部分,而不是 Add-CMDeploymentType