执行命令时 Powershell 挂起

Powershell hang when execute commands

我正在测试通过 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 WhetherOrNotUserLoggedOn)。当我点击进入时,它似乎无法执行。它不显示任何错误,但它只是不执行。我查看帮助,确实存在以下参数。还是因为这些参数取决于您必须首先指定的其他参数集才能运行?

  -MaximumAllowedRunTimeMinutes 20 -EstimatedInstallationTimeMinutes 10 -LogonRequirementType WhetherOrNotUserLoggedOn

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