Thursday, September 29, 2016

SCOM 2016 PowerShell: 12 New PS CMDLETS, 3 Gone

With SCOM 2016 there are 12 new PS cmdlets and 3 – present in SCOM 2012 R2 – are gone.

These are the goners, all SCOM CEIP (Customer Experience Improvement Program) related:

  1. Exit-SCOMCEIP
  2. Join-SCOMCEIP
  3. Test-SCOMCEIP

Which makes sense since in SCOM 2016 CEIP is replaced by Diagnostic and Usage data.

  • SCOM 2012x CEIP:
  • SCOM 2016 Diagnostic & Usage Data:

New PS cmdlets in SCOM 2016 are related to two items:

SCOMTelemetry, 3 cmdlets:

  1. Disable-SCOMTelemetry
  2. Enable-SCOMTelemetry
  3. Get-SCOMTelemetry

The Help option in PS doesn’t reveal much. However my guess is these cmdlets are possibley connected with an application insights functionality. Perhaps OMS based. We’ll see.

SCOMMaintenanceSchedule, 9 cmdlets:

  1. Disable-SCOMMaintenanceSchedule
  2. Edit-SCOMMaintenanceSchedule
  3. Enable-SCOMMaintenanceSchedule
  4. Get-SCOMMaintenanceSchedule
  5. Get-SCOMMaintenanceScheduleList
  6. New-SCOMMaintenanceSchedule
  7. Remove-SCOMMaintenanceSchedule
  8. Stop-SCOMMaintenanceSchedule
  9. Update-SCOMMaintenanceSchedule

This is because (finally) SCOM 2016 supports out of the box the creation of Maintenance Mode schedules. And of course, this new functionality requires PS cmdlets as well.

How this posting came to be
Based on this posting of fellow MVP Stefan Roth I did my research. However, I did some minor adjustments.

First I had two txt files created with all SCOM related PS cmdlets, one for SCOM 2012 R2 (UR#11) and another for SCOM 2016 Eval. However, I had all the spaces removed as well in the txt files, using these lines of PS code:

SCOM 2016:
Get-Command –Module OperationsManager | Select-Object Name | Out-File C:\temp\SC2016PS.txt
$content = Get-Content C:\temp\SC2016PS.txt
$content | Foreach {$_.TrimEnd()} | Set-Content C:\temp\SC2016PS.txt

SCOM 2012:
Get-Command –Module OperationsManager | Select-Object Name | Out-File C:\temp\SC2012PS.txt
$content = Get-Content C:\temp\SC2012PS.txt
$content | Foreach {$_.TrimEnd()} | Set-Content C:\temp\SC2012PS.txt

Then I put both files in the same folder and ran these lines of PS code:
$SC2012PS = Get-Content C:\temp\SC2012PS.txt
$SC2016PS = Get-Content C:\temp\SC2016PS.txt
Compare-Object $SC2012PS $SC2016PS

This is the output I got:

No comments: