摘要
本文介绍 Microsoft System Center 2012 R2 Configuration Manager的累积更新 2 (CU2) 中修复的Windows PowerShell问题。 System Center 2012 R2 Configuration Manager的累积更新 2 中介绍了其他 CU2 修补程序。
已修复的问题
Windows PowerShell
-
Export-CMApplication cmdlet 将替换 -Path 参数中指定的文件,而不提示进行确认。
请注意,安装此更新后,系统会提示你覆盖现有文件。 可以使用 -Force 参数抑制此提示。 -
尝试在使用 New-CMSecondarySite cmdlet 创建的辅助站点上查看分发点的属性会导致类似于以下情况的异常:
System.ArgumentOutOfRangeException
值“1/1/1900 12:00:00 AM”对“Value”无效。 “Value”应介于“MinDate”和“MaxDate”之间。
参数名称:值
请注意,如果此 cmdlet 以前用于创建分发点,如果该分发点现在显示这些症状,则必须重新创建要显示的属性的分发点。 -
将Set-CMSystemHealthValidatorPointComponent cmdlet 与 -SiteSystemServerName 参数配合使用时失败。 此外,还会收到如下所示的错误消息:
Set-CMSystemHealthValidatorPointComponent:没有对象对应于指定的参数。
-
Set-CMSite cmdlet 可能会返回如下所示的错误消息:
警告:无法获取 BGB 端口实例,此站点不是 SP1 站点或某些 DB 数据损坏。
Set-CMSite:输入参数验证失败。 无法继续。
-
New-CMClientSetting cmdlet 错误地允许你创建“默认”类型的客户端设置。
-
当指定的部署类型名称不存在时,Remove-CMDeploymentType cmdlet 返回 Null 而不是错误条件。
-
New-CMTaskSequence cmdlet 在多个方案中失败。
-
Add-CMSoftwareUpdatePoint cmdlet 创建显示在管理员控制台中但无法与 WSUS 同步的软件更新点。
-
仅当将 HTTPS 分发点与 -ValidateContentSchedule 参数结合使用时,Add-CMDistributionPoint cmdlet 才允许创建该分发点。
请注意,此更新添加了一个附加参数 -EnableSSL,以允许独立于传递给 -ClientConnectionType 参数的值控制 SSL 模式。 -
New-CMGlobalCondition cmdlet 错误地要求使用 -WhereClause 参数。
-
如果不使用 -DeviceID 参数,Install-CMClient cmdlet 将不起作用。
-
Start-CMApplicationDeployment cmdlet 与 Windows Microsoft Store、Apple Microsoft Store 或 Google Play 应用程序一起使用时失败,因为预期内容存在于分发点上。
-
与以下参数一起使用的Export-CMDriverPackage cmdlet 失败:
-
-Name
-
-ID
-
-InputObject
此外,还会收到类似于以下内容的错误消息:
Export-CMDriverPackage:值不能为 null。
参数名称: parameterName
-
-
不能使用Windows PowerShell将此包中的内容设置为分发点包属性上的包共享。
-
不能使用Set-CMPackage cmdlet 删除包共享的名称。
请注意-ShareType 参数已删除。
若要启用或禁用共享,请使用新的 -ShareContent <bool> 参数。 -
当 -DeployPurpose 参数定义为“必需”时,Start-CMPackageDeployment cmdlet 会失败。 此外,还会收到类似于以下内容的错误消息:
Start-CMPackageDeployment:无法使用指定的命名参数解析参数集。
注意,对于设备程序部署,必须指定 -DeviceProgram 参数。
对于标准程序部署,必须指定 -StandardProgram 参数。 -
将每日维护时段指定为 -Schedule 参数的输入时,New-CMMaintenanceWindow cmdlet 会失败。 此外,还会收到类似于以下内容的错误消息:
New-CMMaintenanceWindow:由于对象的当前状态,操作无效。
-
Get-CMUserDataAndProfileConfigurationItemXmlDefinition cmdlet 不会返回数据。
-
Set-CMClientSetting cmdlet 将错误的值传递给 -MaxTransferRateOffSchedule 参数。
-
Set-CMClientSetting cmdlet 不验证传递给以下任何参数的输入:
-
-PortalUrl
-
-Priority
-
-Setting
-
-ForceRebootPeriod
-
-
Set-CMSoftwareMeteringRule cmdlet 不使用 -NewProductName 参数。 此外,还会收到如下所示的错误消息:
Set-CMSoftwareMeteringRule:无法使用指定的命名参数解析参数集。
-
Set-CMSoftwareUpdateAutoDeploymentRule cmdlet 缺少可供 -LanguageSelection 参数使用的列表中的多种语言。
请注意,安装此更新后,语言列表将作为参数删除,并在内部验证到 cmdlet。 -
将Remove-CMApplicationRevisionHistory cmdlet 和Restore-CMApplicationRevisionHistory cmdlet 与 -ID 参数一起使用时不起作用。
-
Get-CMAccessLicense cmdlet 需要 -License 参数,而无需在不使用任何参数的情况下返回所有许可证。
-
Start-CMContentDistribution cmdlet 和 Remote-CMContentDistribution cmdlet 返回不准确的警告消息。
-
Set-CMProgram cmdlet 和 -InputObject 参数需要SMS_Package实例而不是SMS_Program。
注意,若要修改标准程序,必须指定 -StandardProgram 参数。
若要修改设备程序,必须指定 -DeviceProgram 参数 -
Set-CMPowerControl cmdlet 不验证 -PowerControlType 参数。
-
Set-CMDeviceOwnership cmdlet 不验证 -OwnershipType 参数。
-
Set-CMTrustedRootCertificateProfileConfigurationItem cmdlet 错误地将 -DesiredConfigurationDigestPath 参数定义为可选参数。
-
Get-CMAssetIntelligenceSynchronizationPoint cmdlet 返回 Null 对象。 这可防止将其用作其他 cmdlet 的输入。
-
Import-CMBaseline cmdlet 和Import-CMConfigurationItem cmdlet 缺少 -Force 参数,以禁止针对内容签名发出安全警报。
-
查看分发点的属性时,管理员控制台中将出现“参数超出范围”异常。 这适用于使用 Add-CMDistributionPoint cmdlet 和 -EnableMulticast 参数创建的分发点。
-
Start-CMPackageDeployment cmdlet 可防止在没有源文件的情况下部署包。
-
将Start-CMPackageDeployment cmdlet 用于设备程序时会失败。
-
Set-CMDistributionPoint cmdlet 返回“将 KeyNotFoundException 消息与 -AddBoundaryGroup 参数或 -RemoveBoundaryGroup 参数一起使用时。
-
与 -DeploymentTypeName 参数或 -DeploymentTypeID 参数一起使用时,Remove-CMDeploymentType cmdlet 将返回“NullReferenceException”消息。
-
迁移集合时,New-CMMigrationJob cmdlet 会失败。
Start-CMDistributionPointUpgrade cmdlet
使用 "开始"菜单-CMDistributionPointUpgrade cmdlet 将共享分发点升级到 Microsoft System Center 2012 R2 Configuration Manager分发点时,cmdlet 会失败。 如果在 -sitecode 参数中引用辅助站点,则会出现此问题。 有关此问题的详细信息,请参阅 System Center 2012 R2 Configuration Manager中的Start-CMDistributionPointUpgrade cmdlet 失败。
其他更改
-
-OnFastNetworkMode 参数添加到 Add-CMDeploymentType cmdlet,以便与 -AppV5xInstaller 参数集一起使用。
-
允许的最大运行时间 (分钟) :使用 setByNamePropertyDeepLinkInstaller 参数集设置Set-CMDeploymentType cmdlet 时无法定义设置。
-
以下 cmdlet 支持配置其他映像属性:
-
Set-CMOperatingSystemImage,
-
Set-CMOperatingSystemInstaller
-
Set-CMBootImage
-
-
Set-CMDriverPackage cmdlet 添加了更多参数来设置驱动程序包属性。
-
多个 Get-and Remove- cmdlet 现在支持查询参数中的通配符字符。 这包括以下 cmdlet:
-
Get-CMAccount
-
Get-CMActiveDirectoryForest
-
Get-CMActiveDirectorySite
-
Get-CMAdministrativeUser
-
Get-CMAlert
-
Get-CMAlertSubscription
-
Get-CMAntimalwarePolicy
-
Get-CMApplication
-
Get-CMApplicationCatalogWebServicePoint
-
Get-CMApplicationCatalogWebsitePoint
-
Get-CMAppVVirtualEnvironment
-
Get-CMAssetIntelligenceCatalogItem
-
Get-CMAutomaticAmtProvisioningStatus
-
Get-CMBaseline
-
Get-CMBaselineXmlDefinition
-
Get-CMBoundary
-
Get-CMBoundaryGroup
-
Get-CMCategory
-
Get-CMClientAuthCertificateProfileConfigurationItem
-
Get-CMClientSetting
-
Get-CMCloudDistributionPoint
-
Get-CMComponentStatusSetting
-
Get-CMConfigurationItem
-
Get-CMConfigurationItemHistory
-
Get-CMConfigurationItemXmlDefinition
-
Get-CMDeployment
-
Get-CMDeploymentStatus
-
Get-CMDevice
-
Get-CMDeviceCollection
-
Get-CMDistributionPoint
-
Get-CMDistributionPointGroup
-
Get-CMDriver
-
Get-CMDriverPackage
-
Get-CMEndpointProtectionPoint
-
Get-CMEnrollmentPoint
-
Get-CMEnrollmentProxyPoint
-
Get-CMFallbackStatusPoint
-
Get-CMGlobalCondition
-
Get-CMHardwareRequirement
-
Get-CMInitialModifiableSecuredCategory
-
Get-CMIPSubnet
-
Get-CMManagementPoint
-
Get-CMManagementPointComponent
-
Get-CMMigrationCollection
-
Get-CMOperatingSystemImage
-
Get-CMOperatingSystemImageUpdateSchedule
-
Get-CMOperatingSystemInstaller
-
Get-CMPackage
-
Get-CMProgram
-
Get-CMRemoteConnectionProfileConfigurationItem
-
Get-CMRemoteConnectionProfileConfigurationItemXmlDefinition
-
Get-CMReportingServicePoint
-
Get-CMSecurityRole
-
Get-CMSecurityScope
-
Get-CMSite
-
Get-CMSitesystemServer
-
Get-CMSoftwareInventory
-
Get-CMSoftwareMeteringRule
-
Get-CMsoftwareUpdate
-
Get-CMSoftwareUpdateDeploymentPackage
-
Get-CMSoftwareUpdateGroup
-
Get-CMSoftwareUpdateLicnese
-
Get-CMSoftwareUpdatePoint
-
Get-CMStateMigrationPoint
-
Get-CMStatusMessageQuery
-
Get-CMStatusSummarizer
-
Get-CMSystemHealthValidatorPoint
-
Get-CMTaskSequence
-
Get-CMTrustedRootCertificateProfileConfigurationItem
-
Get-CMUser
-
Get-CMUserCollectoin
-
Get-CMUserDataAndProfileConfigurationItem
-
Get-CMUserDataAndProfileConfigurationItemXmlDefinition
-
Get-CMUserDeviceAffinity
-
Get-CMVpnProfileConfigurationItem
-
Get-CMVpnProfileConfigurationItem
-
Get-CMWindowsFirewallPolicy
-
Get-CMWinPEOptionalComponentInfo
-
Get-CMWirelessProfileConfigurationItem
-
Remove-CMAccount
-
Remove-CMAlertSubscription
-
Remove-CMAmtProvisioningDataBase
-
Remove-CMApplication
-
Remove-CMApplicationCatalogWebServicePoint
-
Remove-CMApplicationCatalogWebSitePoint
-
Remove-CMAppVVirtualEnvironment
-
Remove-CMAssetIntelligenceSynchronizationPoint
-
Remove-CMBoundaryGroup
-
Remove-CMClientSetting
-
Remove-CMConfigurationItem
-
Remove-CMDevice
-
Remove-CMDeviceCollectoin
-
Remove-CMDistributionPoint
-
Remove-CMDriver
-
Remove-CMEndpointProtectionPoint
-
Remove-CMEnrollmentPoint
-
Remove-CMEnrollmentProxyPoint
-
Remove-CMFallbackStatusPoint
-
Remove-CMGlobalCondition
-
Remove-CMManagementPoint
-
Remove-CMOperatingSystemImage
-
Remove-CMOperatingSystemInstaller
-
Remove-CMProgram
-
Remove-CMReportingServicePoint
-
Remove-CMSecurityRole
-
Remove-CMSecurityScope
-
Remove-CMSoftwareMeteringRule
-
Remove-CMSoftwareUpdateDeploymentPackage
-
Remove-CMSoftwareUpdatePoint
-
Remove-CMStateMigrationPoint
-
Remove-CMStatusMessageQuery
-
Remove-CMSystemHealthValidatorPoint
-
Remove-CMUser
-
Remove-CMUserCollection
-
Remove-DistributionPointGroup
-
Remove-OutOfBandServicePoint
-
-
Set-CMClientSetting cmdlet 支持基于客户端设置类型的新参数。 更改相同名称的设置时,必须使用这些参数。
-
-CloudServicesSettings
-
-EndpointProtectionSettings
-
-RemoteToolsSettings
-
-PowerManagementSettings
-
-StateMessageSettings
-
-UserDeviceAffinitySettings
-
-BitsSettings
-
-ClientPolicySettings
-
-ComplianceSettings
-
-ComputerAgentSettings
-
-ComputerRestartSettings
-
-MeteredNetworkSettings
-
-EnrollmentSettings
-
-HardwareInventorySettings
-
-NetworkAccessProtectionSettings
-
-SoftwareDeploymentSettings
-
-SoftwareMeteringSettings
-
-SoftwareUpdatesSettings
-
-SoftwareInventorySettings
-
-
Get-CMDeviceCollectionVariable cmdlet 现在可以显示特定集合中的所有变量。
已知问题
-
当嵌套集合粘贴到 -MigrationCollection 参数时,New-CMMigrationJob cmdlet 将返回如下所示的错误:
New-CMMigrationJob:选择至少一个集合以继续。
-
使用大型结果集时,某些 cmdlet 可能会返回配额冲突 (通常几千个对象) 。 若要防止此问题,请更改用于返回较少结果的查询。
-
与 -CertificateExpirationTimeUtc 参数一起使用时,Set-CMDistributionPoint cmdlet 不会按预期更新证书过期值。
-
由于对多个 cmdlet 使用的基础Windows PowerShell框架代码进行了其他更改,某些 cmdlet 将不再接受数组作为某些参数的输入。 使用 Get-help <cmdlet_name>验证给定 cmdlet 的语法和输入类型。