What’s new in R2? Spot the Difference!
I don’t know about you all, but I remember sitting in the doctor’s office as a kid, reading the kid magazines, where they had a game to spot the differences in two pictures. Sometimes the differences would be easy to spot, and other times it'd be a bit more challenging. Ah, childhood.
What’s that? How is this related to System Center 2012 R2 you ask? Well, with System Center 2012 Configuration Manager R2 we get a whole lot of new cmdlets available for our use. Unlike the magazines at the doctor’s office, however, it isn't always easy to spot the differences in cmdlets between versions of products. Also, unlike the magazines at the doctor’s office, we can use PowerShell to find the new cmdlets available!
First off, we need a reference machine. Ah yes, my older System Center Configuration Manager 2012 SP1 CU2 site will serve nicely. Here, we’ll export the cmdlets from the Service Pack 1 Configuration Manager module to a CSV for consumption later:
Get-Command -Module ConfigurationManager | select Name | export-csv <path to CSV>
Great. Now, we need to compare this to a newer version of the Configuration Manager Powershell module. I'll copy the CSV we created in the last step to my shiny new System Center 2012 R2 Configuration Manager site server, and with a few lines of Powershell, we can compare to two and find new cmdlets! Note, this won’t tell us any cmdlets that have changed, but it will tell us what is a new addition to System Center 2012 R2.
$NewCmdlets = @()
$CM12SP1Cmdlets = Import-CSV "E:\Output\CM12SP1CU2Cmdlets.csv"
$CM12R2Cmdlets = Get-Command -module ConfigurationManager | select Name
ForEach ($Cmdlet in $CM12R2Cmdlets)
{
If ($CM12SP1Cmdlets.Name -NotContains $Cmdlet.Name)
{
$NewCmdlets += $Cmdlet.Name
}
}
Cool! Now if we look at the values of $NewCmdlets, we have an array of cmdlets that are new to System Center 2012 R2 Configuration Manager!
Copy-CMClientAuthCertificateProfileConfigurationItem
Copy-CMRemoteConnectionProfileConfigurationItem
Copy-CMTrustedRootCertificateProfileConfigurationItem
Copy-CMVpnProfileConfigurationItem
Copy-CMWirelessProfileConfigurationItem
Get-CMAccessLicense
Get-CMClientAuthCertificateProfileConfigurationItem
Get-CMClientOperations
Get-CMDeviceVariable
Get-CMInitialModifiableSecuredCategory
Get-CMMaintenanceWindow
Get-CMRemoteConnectionProfileConfigurationItem
Get-CMRemoteConnectionProfileConfigurationItemXmlDefinition
Get-CMTrustedRootCertificateProfileConfigurationItem
Get-CMVhd
Get-CMVpnProfileConfigurationItem
Get-CMWirelessProfileConfigurationItem
Invoke-CMClientNotification
Invoke-CMContentValidation
Invoke-CMDeviceRetire
Invoke-CMDeviceWipe
Move-CMObject
New-CMClientAuthCertificateProfileConfigurationItem
New-CMDeviceVariable
New-CMMaintenanceWindow
New-CMRemoteConnectionProfileConfigurationItem
New-CMTrustedRootCertificateProfileConfigurationItem
New-CMVhd
New-CMVpnProfileConfigurationItem
New-CMWirelessProfileConfigurationItem
Publish-CMPrestageContentTaskSequence
Remove-CMClientAuthCertificateProfileConfigurationItem
Remove-CMContentDistribution
Remove-CMDeviceVariable
Remove-CMMaintenanceWindow
Remove-CMRemoteConnectionProfileConfigurationItem
Remove-CMTrustedRootCertificateProfileConfigurationItem
Remove-CMVhd
Remove-CMVpnProfileConfigurationItem
Remove-CMWirelessProfileConfigurationItem
Set-CMAssignedSite
Set-CMClientAuthCertificateProfileConfigurationItem
Set-CMDeviceOwnership
Set-CMDeviceVariable
Set-CMMaintenanceWindow
Set-CMRemoteConnectionProfileConfigurationItem
Set-CMTrustedRootCertificateProfileConfigurationItem
Set-CMVhd
Set-CMVpnProfileConfigurationItem
Set-CMWirelessProfileConfigurationItem
No matter the technologies you have to support on a daily basis, this example code or variations of this example code can be used to find new Powershell Cmdlets across all Microsoft products. Have you found an interesting new Powershell Cmdlet? Let me know in the comments below!
Anonymous
November 06, 2013
New-CMDeviceVariable,Set-CMDeviceVariable & Get-CMDeviceVariable: How on Earth would one be able to do something here in regards to variables and the native CM cmdlets prior to R2?Anonymous
November 06, 2013
The comment has been removed