Cumulative Update 4 for System Center 2012 R2 Configuration Manager included many additions and changes to the PowerShell cmdlets that are used to manage the environment.  Here is a list of all the additions, fixes, and changes to cmdlets used for CM12R2.

The following issues with PowerShell CM12 cmdlets have been resolved with CU4:

Add-CMDeploymentType

  • When a deployment type is used that imports its information (such as AppV), the DeploymentTypeName parameter is ignored.
  • The WindowsPhoneStoreInstaller parameter creates incorrect deployment types. This is a regression from Cumulative Update 1.
  • Invalid locations can be specified incorrectly for the following deployment types:
    • Windows Phone Store
    • Google Play Store
    • Apple Store
  • You can configure the following as DownloadContentAsStreaming:
    • MSI deployment
    • Windows .appx type OnSlowNetworkMode values

–  Add-CMDeviceAffinityToUser

User-device affinity for nonprimary users cannot be set on devices. For example, such users can be users who are discovered through Active Directory.

–  Add-CMDistributionPoint

An expired CertificateExpirationTimeUtc can be specified.

–  Add-CMFallbackStatusPoint

StateMessageNum values are not validated against the acceptable range (100 to 100,000).

–  Export-CMPackage

Incorrect errors are reported when ExportFilePath is in an unexpected format.

–  Get-CMSoftwareUpdate

The Id parameter that allows for querying for software updates by ID value is missing.

–  Get-CMStatusFilterRule

No results are returned if the Name parameter is not specified.

Get-CMUser

  • Inconsistent object types are returned (SMS_CombinedUserResources or SMS_Collection-based object), depending on input parameters. This is a regression from the release version of System Center 2012 R2 Configuration Manager. See Get-CMUser notes in the “Breaking changes” section for more information about how this fix may affect you.
  • Non-user objects are matched when you use Name or ResourceId.
  • Not querying both “SMSID” and “Name” values for SMS_CombinedUserResource records. This is a regression from Cumulative Update 2.

–  Import-CMCertificate

Unable to read certificate that is specified by the Path parameter. This is a regression from Cumulative Update 2.

–  New-CMActiveDirectoryForest

Unable to create new Active Directory forest object. This is a regression from Cumulative Update 2.

–  New-CMBoundary

No validation of the Value parameter against Type. This allows for invalid boundary configuration.

–  New-CMClientSetting

Incorrect errors are reported when you create a client setting with a Type argument of “Default.”

–  New-CMCollectionVariable

Unable to add new variables to a collection that has pre-existing variables. This is a regression from Cumulative Update 2.

–  New-CMSecondarySite

Expired CertificateExpirationTimeUtc can be specified.

–  Remove-CMDeviceCollection

Allows for removal of non-device collection when you use it with InputObject or pipeline.

–  Remove-CMUserCollection

Allows for removal of non-user collection when you use it with InputObject or pipeline.

–  Set-CMAssetIntelligenceSynchronizationPoint

Unable to clear Asset Intelligence proxy certificate by setting CertificateFile to “$null.”

–  Set-CMBoundary

The Value parameter is not validated for correct syntax based on the boundary type or Type parameter. This allows for invalid boundary configuration.

–  Set-CMClientPushInstallation

Successive cmdlet executions fail after you run this cmdlet.

Set-CMDeploymentType

  • Cmdlet will silently fail if trying to set a deployment type that does not exist in an application.
  • Allows for configuring an MSI deployment or Windows .appx type OnSlowNetworkMode value asDownloadContentAsStreaming.
  • Cmdlet will silently fail if trying to change a deployment type installer that is not recognized by the cmdlet.

 

–  Set-CMDeviceCollection

Allows for configuration of non-device collection when you use it with InputObject or pipeline.

Set-CMDistributionPoint

  • Expired CertificateExpirationTimeUtc can be specified.
  • AllowFallbackForContent value does not apply to distribution point.

 

–  Set-CMFileReplicationRoute

FileReplicationAccountName does not validate user name correctly in some circumstances.

–  Set-CMStateMigrationPoint

AllowFallbackForContent value does not apply to state migration point.

–  Set-CMSystemHealthValidatorPointComponent

Unable to clear Active Directory publishing or query accounts by setting null or empty value for PublishAccount and QueryAccount.

–  Set-CMUserCollection

Allows for configuration of non-user collection when you use it with InputObject or pipeline.

–  Start-CMDistributionPointUpgrade

Expired CertificateExpirationTimeUtc can be specified.

–  Update-CMCertificate

Unable to read certificate specified by the Path parameter. This is a regression from Cumulative Update 2.

 

Cumulative Update 4 has also introduced the following new cmdlets to Configuration Manager 2012 R2

–  Add-CMDeploymentTypeDependency

Adds a deployment type as a dependency to a dependency group. Required input is a deployment type object from Get-CMDeploymentType and a dependency group from [Get|New]-CMDeploymentTypeDependencyGroup.

Example
Get-CMDeploymentType -ApplicationName MyApp |
New-CMDeploymentTypeDependencyGroup -GroupName MyGroup |
Add-CMDeploymentTypeDependency -DeploymentTypeDependency `
(Get-CMDeploymentType -ApplicationName MyChildApp) `
-IsAutoInstall $true

–  Add-CMDeploymentTypeSupersedence

Sets one deployment type to supersede another. Required input is a superseding type from Get-CMDeploymentTypeand superseded deployment type from Get-CMDeploymentType.

Example
Get-CMDeploymentType -ApplicationName MyApp |
Add-CMDeploymentTypeSupersedence -SupersedingDeploymentType `
(Get-CMDeploymentType -ApplicationName MySupersedingApp)

–  ConvertFrom-CMApplication

Converts an AppMgmt SDK “Application” object into an SMS_Application object for insert into the SMS Provider. Notice that this only creates an SMS_Application instance. It is up to the calling code to actually insert it into WMI.

Example
$app = Get-CMApplication -Name MyApp |
ConvertTo-CMApplication
# (placeholder code to make changes against $app object)
$obj = ConvertFrom-CMApplication -Application $app
$obj.Put()
–  ConvertFrom-CMConfigurationItem

Converts a DCM Object Model SDK ConfigurationItem or derived object to XML string.

Example
$rule = Get-CMConfigurationItem | ConvertTo-CMConfigurationItem
$xml = ConvertFrom-CMConfigurationItem -ConfigurationItem $rule
–  ConvertTo-CMApplication

Converts an SMS_Application or SMS_DeploymentType into an AppMgmt SDK “Application” object. Can be converted back into an “SMS_Application” by using the ConvertFrom-CMApplication cmdlet.

Example
$app = Get-CMApplication -Name MyApp | ConvertTo-CMApplication

–  ConvertTo-CMConfigurationItem
Converts a CI-based object from the SMS Provider or XML string to a DCM Object Model SDK object derived from ConfigurationItem.

Example
Get-CMConfigurationItem | ConvertTo-CMConfigurationItem

–  Get-CMCertificate

Get certificates stored for the site. These can be ISV Proxy, boot media, or distribution point certificates. Output of this cmdlet can be pipelined into other Certificate cmdlets such as Block-CMCertificate. Notice that queries that are made by using Thumbprint may be slower than other queries, especially with large result sets.

Example
$bootmedia = Get-CMCertificate -CertificateType BootMedia

 

–  Get-CMDeploymentTypeDependency

Gets existing dependent deployment types from a dependency group. Required input is a dependency group object fromGet-CMDeploymentTypeDependencyGroup.

Example
Get-CMDeploymentType -ApplicationName MyApp |
Get-CMDeploymentTypeDependencyGroup -GroupName MyGroup |
Get-CMDeploymentTypeDependency
–  Get-CMDeploymentTypeDependencyGroup

Gets an existing deployment type dependency group. Can be changed by using Add-CMDeploymentTypeDependencyor Remove-CMDeploymentTypeDependency. Required input is a deployment type object from Get-CMDeploymentType.

Example
Get-CMDeploymentType -ApplicationName MyApp |
Get-CMDeploymentTypeDependencyGroup

 

–  Get-CMDeploymentTypeSupersedence

Gets supersedences for a superseded deployment type. Required input is a superseded deployment type.

Example
Get-CMDeploymentType -ApplicationName MyApp |
Get-CMDeploymentTypeSupersedence
–  Get-CMMigrationSource

Gets information for a migrated source hierarchy. Can be used with Sync-CMMigrationSource to view the status of migration.

Example
Get-CMMigrationSource | select Status
–  Get-CMObjectSecurityScope

Gets all security scopes associated with the specified InputObject. This can be used on any object that uses security scopes.

Example
Get-CMSoftwareUpdateGroup | Get-CMObjectSecurityScope
Get-CMBoundaryGroup | Get-CMObjectSecurityScope
–  Get-CMQuery

Gets a query.

Example
Get-CMQuery -Name “All Personal Devices”
–  Get-CMSiteDefinition

Gets site definition information from SMS_SiteDefinition class. This contains various site-wide and configuration settings.

Example
Get-CMSiteDefinition -SiteCode PRI
–  Get-CMSiteRole

Gets a list of site roles from a site server or site servers.

Example
Get-CMSiteRole -SiteSystemServerName myserver.contoso.com
–  Get-CMSupportedPlatforms

Gets a list of supported platforms. Can be used for pipelining into Import-CMDriver.

Example
Get-CMSupportedPlatforms -Name ‘All Windows*’
–  Invoke-CMQuery

Invokes a query and returns the results.

Example
Get-CMQuery -Name “My Systems” | Invoke-CMQuery
–  Invoke-CMSystemDiscovery

Instructs site to start Active Directory system discovery as soon as possible.

Example
Invoke-CMSystemDiscovery -SiteCode ABC
–  Invoke-CMUserDiscovery

Instructs site to start Active Directory user discovery as soon as possible.

Example
Invoke-CMUserDiscovery -SiteCode ABC
–  Invoke-GroupDiscovery

Instructs site to start Active Directory group discovery as soon as possible.

Example
Invoke-CMGroupDiscovery -SiteCode ABC
–  New-CMADGroupDiscoveryScope

Creates an object that can be used to configure an active directory group discovery scope together with Set-CMDiscoveryMethod.

Example
Set-CMDiscoveryMethod -ActiveDirectoryGroupDiscovery `
-AddGroupDiscoveryScope (New-CMADGroupDiscoveryScope `
-name MyScope -SiteCode R2s -LdapLocation `
“LDAP://CN=ScopeLocation,DC=contoso,DC=com”-RecursiveSearch $true)


–  New-CMDeploymentTypeDependencyGroup

Creates an abstract deployment type dependency group. Must be added to an existing deployment type by using Add-CMDeploymentTypeDependency. Required input is a deployment type object from Get-CMDeploymentType.

Example
Get-CMDeploymentType -ApplicationName MyApp |
New-CMDeploymentTypeDependencyGroup -GroupName MyGroup
–  New-CMEmbeddedObjectInstance

For advanced use cases in which you have to directly manipulate result objects from the SMS Provider or from object queries. Creates a new embedded object of an ad hoc class. Notice that for “SMS_EmbeddedProperty” or “SMS_EmbeddedPropertyList” types, there is New-CMEmbeddedProperty and New-CMEmbeddedPropertyList.

Example
$prop = New-CMEmbeddedObjectInstance -ClassName “SMS_EmbeddedProperty”
–  New-CMEmbeddedProperty

For advanced use cases in which you have to directly manipulate results from the SMS Provider or from object queries. Creates a new SMS_EmbeddedProperty instance and can also set values.

Example
$dp = Get-CMDistributionPoint -SiteSystemServerName mydp001.contoso.com
$embeddedProperty = New-CMEmbeddedProperty -PropertyName “UpdateBranchCacheKey” -Value 1
$props = $dp.EmbeddedProperties
$props[“UpdateBranchCacheKey”] = $embeddedProperty
$dp.EmbeddedProperties = $props
$dp.Put()

–  New-CMEmbeddedPropertyList

For advanced use cases in which you have to directly manipulate results objects from the SMS Provider or from object queries. Creates a new SMS_EmbeddedPropertyList instance and can also set values.

Example
$propList = New-CMEmbeddedPropertyList -PropertyListName MyList -Values (“abc”, “def”, “xyz”)
–  New-CMQuery

Creates a new query.

Example
New-CMQuery -Name “My Systems” -Expression `
“select * from SMS_R_System where Name LIKE ‘ABC%’
–  Remove-CMCollection

Removes an invariant collection by value, can be used instead of Remove-CMUserCollection and Remove-CMDeviceCollection for collection removal.

Example
Get-CMUserCollection -Name MyCollection | Remove-CMCollection -Force
Get-CMDeviceCollection -Name MyDeviceCollection |
Remove-CMCollection -Force
–  Remove-CMDeploymentTypeDependency

Removes a deployment type dependency from a deployment type dependency group. If removing a dependency causes the group to have no more dependencies, the group will be removed. Required input is a deployment type object fromGet-CMDeploymentType or Get-CMDeploymentTypeDependency and a dependency group from Get-CMDeploymentTypeDependencyGroup.

Example
$dpGroup = Get-CMDeploymentType -ApplicationName MyApp |
Get-CMDeploymentTypeDependencyGroup -GroupName MyGroup `
$dpDeps = Get-CMDeploymentTypeDependency -Group $dpGroup
Remove-CMDeploymentTypeDependency -Group $dpGroup `
-DeploymentTypeDependency $dpDeps[1] -Force


–  Remove-CMDeploymentTypeDependencyGroup

Removes a deployment type dependency group (and its dependencies) from a deployment type. Required input is a dependency group from Get-CMDeploymentTypeDependencyGroup.

Example
Get-CMDeploymentType -ApplicationName MyApp |
Get-CMDeploymentTypeDependencyGroup -GroupName MyGroup |
Remove-CMDeploymentTypeDependencyGroup -Force
–  Remove-CMDeploymentTypeSupersedence

Removes a superseding deployment type from a superseded deployment type. Required input is a superseding type fromGet-CMDeploymentType or Get-CMDeploymentTypeSupersedence and superseded deployment type from Get-CMDeploymentType.

Example
Get-CMDeploymentType -ApplicationName MyApp |
Remove-CMDeploymentTypeSupersedence -SupersedingDeploymentType `
(Get-CMDeploymentType -ApplicationName MySupersedingApp)


–  Remove-CMQuery

Removes a query.

Example
Get-CMQuery -Name “My Systems” | Remove-CMQuery -Force
–  Set-CMDeploymentTypeDependencyGroup

Configures settings for a deployment type group. Required input is a dependency group from Get-CMDeploymentTypeDependencyGroup.

Example
Get-CMDeploymentType -ApplicationName MyApp |
Get-CMDeploymentTypeDependencyGroup -GroupName MyGroup |
Set-CMDeploymentTypeDependencyGroup -NewName MyNewGroup
–  Set-CMDeploymentTypeSupersedence

Configures settings for a deployment type supersedence. Required input is a superseding type from Get-CMDeploymentType or Get-CMDeploymentTypeSupersedence and superseded deployment type from Get-CMDeploymentType.

Example
Get-CMDeploymentType -ApplicationName MyApp |
Set-CMDeploymentTypeSupersedence -SupersedingDeploymentType `
(Get-CMDeploymentType -ApplicationName MySupersedingApp) `
-IsUninstall $true

 

–  Set-CMQuery

Configures a query.

Example
Get-CMQuery -Name “My Systems” |
Set-CMQuery -NewName “My ABC Systems”
–  Sync-CMMigrationSource

Starts a synchronization for a migrated source hierarchy.

Example
Sync-CMMigrationSource

 

 

And the following improvements have been made to existing cmdlets:


Add-CMDeploymentType

  • New optional parameter for requirements rules: AddRequirement. Rules must be created by using the DCM Object Model SDK.
  • New optional parameter: Application. Accepts input from Get-CMApplication as an alternative forApplicationName.

–  Add-CMDistributionPoint

New EnableBranchCache parameter added to enable branch cache for new distribution point.

–  Add-CMFallbackStatusPoint

ThrottleInterval and StateMessageNum parameters are no longer mandatory. Default values will be used for ThrottleInterval (3,600) and StateMessageNum (10,000) if no values are defined.

–  Block-CMCertificate

New Certificate parameter to allow for pipelining object from Get-CMCertificate.

–  Clear-CMClientOperation

New optional Operation parameter that accepts input from Get-CMClientOperation.

–  Disable-CMStatusFilterRule

The Name parameter now accepts wildcard values.

–  Enable-CMStatusFilterRule

The Name parameter now accepts wildcard values.

–  Export-CMSecurityRole

Additional support for exporting security roles by name (RoleName) or by value (Role).

–  Get-CMAppV5XDeploymentTypeItem

Now accepts pipelined input from Get-CMDeploymentType.

Example
Get-CMDeploymentType -ApplicationName “MyApp” `
-DeploymentTypeName “AppV5X” | Get-CMAppV5XDeploymentTypeItem

 

–  Get-CMClientPushInstallation

No longer requires a mandatory search parameter for finding client push installation details.

–  Get-CMDeploymentType

Can pipeline result object from Get-CMApplication to get deployment types.

Example
Get-CMApplication -Name “Contoso App” |
Get-CMDeploymentType s-Name “MSI Installer”

 

–  Get-CMManagementPointComponent

No longer requires mandatory SiteCode and SiteSystemName parameters.

–  Get-CMSoftwareUpdate

New optional OnlyExpired parameter to scope query to only get expired updates for faster queries.

–  Get-CMStatusFilterRule

The Name parameter now accepts wildcard values.

–  Get-CMUser

Performance improvements with large result sets.

–  Import-CMComputerInformation

SmBiosId and MacAddress can be defined when you use ComputerName instead of both being required. If neither is defined, the cmdlet will fail.

Import-CMDriver

  • New optional ImportFolder parameter to indicate that all drivers in the folder that is specified by using UncFileLocation should be processed.
  • New optional SupportedPlatforms parameter that accepts input from Get-CMSupportedPlatforms for setting a driver’s supported platforms.

 

–  Lock-CMObject

Now accepts objects through pipeline.

Example
Get-CMDriverPackage | Lock-CMObject

 

–  New-CMApplication

New optional DisplaySupersedencesInApplicationCatalog parameter toggles the ability to display supersedences in the application catalog.

–  New-CMMaintenanceWindow

New optional Collection parameter accepts input from Get-CMCollection.

–  New-CMSecondarySite

New EnableBranchCache parameter added to enable branch cache for secondary site distribution point.

–  Remove-CMApplicationRevisionHistory

Accepts pipelined input from Get-CMApplicationRevisionHistory for removing a specific application revision.

Example
Get-CMApplicationRevisionHistory -Name “Contoso App” -Revision 2 |
Remove-CMApplicationRevisionHistory

 

–  Remove-CMClientOperation

New optional Operation parameter accepts input from Get-CMClientOperation.

–  Remove-CMDeployment

New optional Deployment parameter accepts an object from Get-CMDeployment that allows for deleting update, package, operating system, and application deployments.

Note DeploymentId and ApplicationName will continue to support only application deployments. This behavior is subject to change in a future release.

–  Remove-CMDeploymentType

The ApplicationName parameter is no longer required when you use DeploymentType or pipeline from Get-CMDeploymentType.

–  Remove-CMMaintenanceWindow

New optional Collection parameter accepts input from Get-CMCollection.

–  Remove-CMStatusFilterRule

The Name parameter now accepts wildcard values.

–  Set-ClientPushInstallation

Now supports pipelining from Get-CMClientPushInstallation.

–  Set-CMApplication

New optional DisplaySupersedencesInApplicationCatalog parameter toggles the ability to display supersedences in the application catalog.

Set-CMDeploymentType

  • New optional parameters for requirements rules:
    • AddRequirement
    • RemoveRequirement
    • ClearRequirements

Rules must be created by using the DCM Object Model SDK.
NoteRemoveRequirement input must match the RuleId value of the requirement rule in the deployment type. Otherwise, it will not be removed.

  • ApplicationName is no longer a required parameter if a DeploymentType input object is used.
  • Now supports pipelining from Get-CMDeploymentType.

Example
Get-CMDeploymentType -ApplicationName sccmapp `
-DeploymentTypeName adberdr934_4.6.33.315 |
Set-CMDeploymentType -AppV5xInstaller -OnSlowNetworkMode DoNothing

Set-CMDiscoveryMethod

  • New optional parameters when you configure group discovery with ActiveDirectoryGroupDiscovery:
    • AddGroupDiscoveryScope 
    • RemoveGroupDiscoveryScope

 

  • AddGroupDiscoveryScope requires input that is created by the New-CMADGroupDiscoveryScope cmdlet.
  • RemoveGroupDiscoveryScope requires string matching scope name.

Example
Set-CMDiscoveryMethod -ActiveDirectoryGroupDiscovery `
-AddGroupDiscoveryScope (New-CMADGroupDiscoveryScope `
-name MyScope -SiteCode R2S -LdapLocation `
“LDAP://CN=ScopeLocation,DC=contoso,DC=com”  -RecursiveSearch $true)
–  Set-CMDistributionPoint
New EnableBranchCache parameter added to configure branch cache on distribution point.

–  Set-CMMaintenanceWindow

New optional Collection parameter accepts input from Get-CMCollection.

–  Set-CMManagementPointComponent

Now accepts pipelined input from the following cmdlets:

  • Get-CMSiteDefinition (new cmdlet)
  • Get-CMManagementPoint
  • Get-CMSite
  • Get-CMManagementPointComponent

– Set-CMPackage

  • New optional parameters for changing distribution (prestage, multicast) and data source (package update) properties to match admin console property sheets.
  • Renamed several parameters for clarity and consistency. These newly named parameters are aliased to the old names to preserve compatibility.

 

–  Unblock-CMCertificate

New Certificate parameter allows for pipelining object from Get-CMCertificate.

–  Unlock-CMObject

Now accepts objects through pipeline.

Example
Get-CMDriverPackage | Unlock-CMObject

Update-CMCertificate

  • The new optional Force parameter prevents prompting for overwriting existing certificate.
  • The new Certificate parameter allows for pipelining object from Get-CMCertificate.

 

É

Advertisements