The Accidental Podcast guest

June 10, 2015 Leave a comment

This should have been posted 6/10/15!

Last week, (first week of June) I was visiting Atlanta GA, taking care of summer plans for the family. Being a frequent visitor of the taping of the PowerScripting Podcast, and I knew Hal was out of town, I decided to ask,  Jon Waltz @jonwalz if I could come by and co-host the talk. I had a freaking blast recording (if only could have seen the Chat to answer questions as they came thru HAHA!) It should be Episode 302 of the PowerScripting Podcast or something like that. The video recording of the live taping is on


A few items I mentioned in Episode 302 of the PowerScripting Podcast

Plural Sight Course “Play by Play: PowerShell from Idea to Action with Don Jones and Jeff Hicks”

Plural Sight Blog post on Azure Operational Insights “Lessons learned: Azure Operational Insights (Preview)”

System Center: Operations Manager Engineering Blog “How to stop the receiving of Operational Insights Configuration Alerts (formerly ‘Advisor’) in Operations Manager”

Blogs related to all things Operations Manager

Bob Cornelissen’s Blog

Cameron Fuller’s Blog

Daniele Grandini’s Blog

Jonathan Almquist’s Blog

Kevin Greene’s Blog

Kevin Holman’s Blog

Marnix Wolf’s Blog


OpsMgr Product Team’s

Stefan Roth’s Blog

Stefan Stranger’s blog

Tao Yang’s System Center Blog

System Center/Azure related Pod Cast

Inside Podcast

Free Operations Manager E-book “Microsoft System Center Operations Manager Field Experience”


Best of Build and Windows 10

PowerShell: Auto Closing Alerts By Rules & Reckoning UTC Time With Day Light Savings

New Post: SCOM 2012 R2 Technical Preview 2 – What’s New?

Just in case Department: if you don’t want Ops Insight Alerts going to SCOM any more

#AzureStack @ #MSIgnite

System Center 2016 Technical Preview 2 Management Packs for Open Source Software

Microsoft wants to Understanding your Linux Monitoring Challenges

It is a new Microsoft, and they love Linux, so much so the Operations Manager product team would like to hear your pain points and monitoring Challenges from Linux Administrators.

(in the blog post asking for this information they state out right they are not trying to sell you anything only trying to collect pain points and challenges to monitoring your Linux environment)

Link to the announcement

If you are interested in talking to the product team for 30 minutes take 5 minutes to fill out this survey

Categories: Linux Tags:

New SCOM 2012 Dashboard Example

A new dashboard example using the tiny blue bars as visual metrics is available on Wei H Lim blog

The MPB bundle for the sample dashboard in the link above can be found in the TechNet Library.

Do not forget to go get the Microsoft Virtual Academy and download the Operations Manager Field Guide link.

MS Ignite 2015 Announcements

Like many IT Professionals this week, I was not at the MS Ignite. Like many of you have heard some of the many announcements, and I wanted to share a few of the System Center and Server related announcements.

Office 2016 Preview

Windows 10 Preview ISO Download (I almost forgot this one)

Now Available – System Center 2016 Technical Preview 2

Once you have signed up for the technical preview 2 for system center the download of all the iso’s will begin.

Microsoft Operations Management Suite

If your looking for the future direction of SCOM, a fellow MVP Kevin Greene @kgreeneit tweeted from MS Ignite this week, pay attention to Operations Management Suite.

Overview of Microsoft Operations Management Suite

Microsoft Operations Management Suite (MOMS) Solutions

Windows Server 2016 Technical Preview 2

Microsoft Announces Nano Server for Modern Apps and Cloud

Getting Started with Nano Server

These are just some of the many many items that happened this week at MS Ignite. It really looks like Microsoft has been bringing their A game. Let us see if they can follow thru.

Categories: Uncategorized Tags:

MP Author – how to add a Reference

I was asked the question today, how to add a Reference MP in MP Author. As I had not done much MP Authoring using MP Author, I had not yet done this specific task yet but it was easy enough to find.

Why would you want to add a reference MP to an MP you are authoring? One reason would be to utilize any Classes that were made marked as Public. So say if you wanted to utilize the SQL Database Class, because you need to author a special monitor for all SQL Databases, just add a reference in your Management Pack to the (the same version you are using in your production SCOM Management Group) to be able to target a new monitor in your management pack to the SQL Database Class.

To add a reference MP, first copy the sealed MP file to the following folder (if you did a default install of the MP Author tool) C:\Program Files\Silect\MP Author\ManagementPacks

There are actually two ways adding a reference MP could be done.

1. When creating the MP, in the Add Wizard screen click the Add Optional References button, and select the MP from the list, then click ok.



2. Once the MP is open in MP Author, right click the MP Name under MP Contents, then select Add Reference option, and then select the MP you would like to reference from the list then click ok.

I’ll write up more small tidbits from MP Author as I use the application. For now enjoy!

Categories: Uncategorized

Happy New year 2015!

January 16, 2015 Leave a comment


Happy belated New year all to all!

I was renewed for a 6th year as an MVP Jan 1st 2015.

It is quite an honor and privilege to work with such a dedicated group of diverse individuals that could only come together thru a program like the Microsoft Most Valuable Professional Award.

I am a bit behind on my community involvement because I have relocated to Houston Texas for a new employment opportunity.  I actually moved here 7 weeks ago and my family just arrived this past weekend, so I am finally starting to get back to a normal routine. I hope to get involved in the local System Center Community here in Houston over the next month. As a part of this effort I will be going in person up to SCU 2015 (wed Feb 4th) in Dallas this year.

If you have any SCOM related questions, requests, or how to do something feel free to contact me at jscottmossATgmailDOTcom.

-Scott Moss

MidWest Management Summit 2014 Administrative Uses of PowerShell in SCOM 2012

November 12, 2014 Leave a comment

Here is a dump of the one liners and examples from my Administrative Uses of PowerShell in SCOM 2012.


# NEED TO KNOW for writing effective PowerShell criteria based queries to the opsmgr db.
# Severity : Critical = 2,  Warning = 1, Information = 0
# Priority : High = 2, Medium = 1, Low = 0
# ResolutionState: Closed = 255, New = 0
# IsMonitorAlert: True = 1, False = 0

#Importing the SCOM PowerShell module
Import-module OperationsManager
#Connect to localhost when running on the management server
$connect = New-SCOMManagementGroupConnection –ComputerName localhost

# Or enable the two lines below and of course enter the FQDN of the management server in the first line.
#$MS = ""
#$connect = New-SCOMManagementGroupConnection –ComputerName $MS

#Get New Critical Alerts Counts
(Get-SCOMAlert -ResolutionState 0 -Severity 2).count
#Get A count of all Critical alerts both open and closed
(Get-SCOMAlert -ResolutionState 0,255 -Severity 2).count
#Get New Warning Alerts Counts
(Get-SCOMAlert -ResolutionState 0 -Severity 1).count
#Get New Informational Alerts Counts
(Get-SCOMAlert -ResolutionState 0 -Severity 0).count

#get a count of rule based alerts
(Get-SCOMAlert -criteria "IsMonitorAlert=0").count
#Get a count of monitor based alerts
(Get-SCOMAlert -criteria "IsMonitorAlert=1").count

#WILL THIS WORK? NO, once IsMonitorAlert is added as a part of the criteria, have to use ""
#(Get-SCOMAlert -resolutionstate 0 -severity 2 -Criteria "IsMonitorAlert = 0").count
#the following line will work
(Get-SCOMAlert -Criteria "ResolutionState = 0 AND Severity = 1 AND IsMonitorAlert = 0").count
#the order of the critera is not that important unless your data set is large, in that case use the big filter first
(Get-SCOMAlert -Criteria "IsMonitorAlert = 0 and ResolutionState = 0 AND Severity = 1").count

#Get New Error Alerts, sort by Name
Get-SCOMAlert -ResolutionState 0 -Severity 2 | sort Name
#Get New Warning Alerts, sort by name
Get-SCOMAlert -ResolutionState 0 -Severity 1 | sort Name
#Get New Informational Alerts, sort by name
Get-SCOMAlert -ResolutionState 0 -Severity 0 | sort Name

# Get a list of open ERROR alerts created by a monitor
Get-SCOMAlert -Criteria "ResolutionState = 0 AND Severity = 2 AND IsMonitorAlert = 1"

# get a LIST of open alerts created by a monitor
Get-SCOMAlert -Criteria "ResolutionState = 0 AND IsMonitorAlert = 1"
# get a COUNT of open alerts created by a monitor
(Get-SCOMAlert -Criteria "ResolutionState = 0 AND IsMonitorAlert = 1").count

# get a LIST of open alerts created by a rule
Get-SCOMAlert -Criteria "ResolutionState = 0 AND IsMonitorAlert = 0"
# get a COUNT of open alerts created by a rule
(Get-SCOMAlert -Criteria "ResolutionState = 0 AND IsMonitorAlert = 0").Count

# get list of closed alerts created by a monitor
Get-SCOMAlert -Criteria "ResolutionState = 255 AND IsMonitorAlert = 1"

# get list of closed alerts created by a rule
Get-SCOMAlert -Criteria "ResolutionState = 255 AND IsMonitorAlert = 0"
# get a list of open alerts that are warning alerts
Get-SCOMAlert -Criteria "ResolutionState = 0 AND Severity = 1"
# open critical alerts
Get-SCOMAlert -Criteria "ResolutionState = 0 AND Severity = 2"
# Open Critical and Warning alerts
Get-SCOMAlert -ResolutionState 0 -Severity 2,1

# Becasue you would never want to close an alert generated by a monitor, with out resetting #the health of the alerts monitor. There will not be a one liner that will close alerts generated #by a monitor. There will be a script that will do that available soon.

# Get New Alerts generated by a rule, and close the alerts.
Get-SCOMAlert -Criteria "ResolutionState = 0 AND IsMonitorAlert = 0" | Resolve-SCOMAlert -Comment ‘Alerts Closed by Chuck Norris’

#SCOM 2012 backup all MPS
Get-SCManagementPack | Export-SCManagementPack -path c:\MPBackup

#Get Agents that are not healthy
Get-SCOMAgent | where {$_.HealthState -ne “Success”}

#how to enable agent proxy
Get-SCOMAgent |where {$_.ProxyingEnabled -like $false}|Enable-SCOMAgentProxy
#To verify this one-liner has the desired effect, run the following one-liner, which returns a
#list of agents along with confirmation that agent proxy has been enabled.
Get-SCOMAgent |where {$_.ProxyingEnabled -like $true} | select Name, ProxyingEna-bled

#The Get-SCOMAgentApprovalSetting cmdlet fetches the AgentApprovalSetting for the #management group to which the OpsMgr PowerShell console is currently connected. It will #show either, Pending, AutoApprove, or AutoReject.

#The cmdlet Set-SCOMAgentApprovalSetting sets the AgentApprovalSetting for the #management group to which the OpsMgr PowerShell console is currently connected. The #three parameters are AutoApprove, AutoReject, and Pending. Here is an example to set the #agent approval setting for the management group to manual:
Set-SCOMAgentApprovalSetting -Pending
#To verify the changes were applied, run the following:

#Add custom alert resolution states
Add-SCOMAlertResolutionState -Name ‘OS Support’ -ResolutionStateCode 15
Add-SCOMAlertResolutionState -Name ‘Exchange Support’ -ResolutionStateCode 20
#To verify the alert resolution state changes, run the get-scomalertresolutionstate

#remove custom alert
Get-SCOMAlertResolutionState -Name ‘OS Support’ | Remove-SCOMAlertResolutionState

#Working with resource pools
Get-SCOMResourcePool -Name "Notifications Resource Pool" | GM
#changing the resourec pool
Get-SCOMResourcePool -Name “Notifications Resource Pool”|Set-SCOMResourcePool –EnableAutomaticMembership $FALSE
#how to verify settings changes
Get-SCOMResourcePool -DisplayName “Notifications Resource Pool” |FT Name, IsDynamic

#SCOM license mini-report
Get-SCOMAccessLicense | measure-object -property LogicalProcessorCount,PhysicalProcessorCount -sum | foreach {$_.Property + " Total : " + $_.Sum}

#How to retrieve a list of all object classes present in your Operations Manager 2012 #management group:
Get-SCOMClass| format-table DisplayName, Description
#Determine the management pack in which the class is defined:
Get-SCOMClass| format-table DisplayName, Description, ManagementPack
#Use the following to send this information to a csv file for easy reading in Excel:
Get-SCOMClass | select-object DisplayName, Description | export-csv -path c:\classes.csv
#Retrieving all the classes defined in a specific management pack is also a single line affair #with the following one-liner, which retrieves all the classes in the #Microsoft.SQLServer.Library management pack:
get-scomclass | where {$_.ManagementPackName -like ‘Microsoft.SQLServer.Library’}

#Exploring Discovered Instances
Get-SCOMClassInstance| select-object DisplayName, Name, Description

Get-SCOMClass -name "Microsoft.SQLServer.2012.Database" | Get-SCOMClassInstance

Get-SCOMClass -name "Microsoft.SQLServer.2012.Database" | Get-SCOMclassInstance | Format-Table DisplayName, PathName -auto

#The Get-SCOMGroup cmdlet makes this an easy task, facilitating enumeration of group members in a single line of PowerShell, as shown in the following example.
Get-SCOMGroup -DisplayName "<DisplayName of Group>" | GetSCOMClassInstance
Get-SCOMGroup -DisplayName "<DisplayName of Group>" | GetSCOMClassInstance | export-csv D:\TEMP\groupmembers.csv -notypeinfo

#getting alerts related to a group
$Group = Get-SCOMGroup -displayname ‘BLOG – My Application’
$ClassInstances = $Group.GetRelatedMonitoringObjects(‘Recursive’)
$Alerts = Get-SCOMAlert -instance $ClassInstances -ResolutionState (0..254)
$Alerts | ft Name

#Temporarily Disabling All Notification Subscriptions
Get-SCOMNotificationSubscription | where {$_.Enabled -eq $true} | Disable-SCOMNotificationSubscription

#Enable all notification subs
Get-SCOMNotificationSubscription | where {$_.Enabled -eq $false} | Enable-SCOMNotificationSubscription

#Report on Agent Primary Management Server and Failover Management Servers
Get-SCOMAgent|sort ComputerName|ft -a Computer-Name,primarymanagementservername,@{l="SecondaryManagementServers"; e={$_.getfailovermanagementservers()|foreach{$}}}

#cool way of flushing a SCOM Agent Cache using powershell

#Add SCOM Subscribers the easy way

Add-SCOMNotificationSubscriber -Name ‘James Moss’ -DeviceList ‘’,’sms:4048675309′,’sip:JIMMYjames’


#Connect SCOM 2007 cmdlets to 2012 OM load snapin and run startup script
Add-PSSnapIn Microsoft.EnterpriseManagement.OperationsManager.Client

# To Find out what the OperationsManager Cmdlets are
get-command -module OperationsManager

#Retrieve PowerShell Cmdlets and Parameters
Get-Command -Module OperationsManager | Select-Object -Property Name,@{Name=’Parameters’;Expression={(Get-Command $_).Parameters.Keys}} | Sort Name

#Find out more about the OperationsManager Module
$mod=get-module OperationsManager
$mod | select * | more

#Help is also a great helper when you are trying to get familiar with new cmdlets
#I want to find out what cmdlets have SCOMALERT in their name
Get-help *SCOMALERT*
#Or what cmdlets have SCOMCLASS in their name
Get-help *SCOMCLASS*

#Get-Member is your friend to show you information about the objects cmdlets are bringing back
Get-SCOMAlerts | Get-Member
Get-SCOMAlerts | GM
# you can pipe several cmdlets together and utilize GM to see the properties and methods available to the resulting objects
GET-SCOMAlerts |

#to limit what get-member brings back specify the member type to property
get-member -membertype property

#info about properties

#Ever wanted to know what you can pipe between cmdlets?  Say you are using the Get-#SCOMRule cmdlet to figure something about a SCOM Rule
#1) Pipe the Get-SCOMRule  Get-Member to find out the TypeName which is #Microsoft.EnterpriseManagement.Configuration.ManagementPackRule
#2) use get-command –ParameterType #Microsoft.EnterpriseManagement.Configuration.ManagementPackRule  to find out what #cmdlets will work with it.
#this piece of information came from Jeffery Snover from a MS TechEd video with Don Jones, I #think it was 2014 NA.
#But if you ever have to learn some new cmdlets from another module like Office 365 or Lync, #this could literally help you cut your learning curve in half by knowing
#what cmdlets can work together using the same types of data

get-command -ParameterType Microsoft.EnterpriseManagement.Configuration.ManagementPackRule

PS D:\> get-command -ParameterType Microsoft.EnterpriseManagement.Configuration.ManagementPackRule

CommandType     Name                                               ModuleName
———–     —-                                               ———-
Cmdlet          Disable-SCOMRule                                   OperationsManager
Cmdlet          Enable-SCOMRule                                    OperationsManager
Cmdlet          Get-SCOMEvent                                      OperationsManager
Cmdlet          Get-SCOMOverride                                   OperationsManager
Cmdlet          Get-SCOMOverrideResult                             OperationsManager

#another problem that you can run across when working with PowerShell is missing what #type of data a property is using
#an example that happened earlier this year is someone was trying to figure out how many #SCOM rules are enabled by default.
#so if you briefly look at the get-member output from get-scomrule you will notice that there #is a property called Enabled.
#going from my previous experience, and not looking at this information from Get-member, I #thought for sure it would be a Boolean value like $True or $False
Get-scomrule | GM
#enabled is actually a multiple value possibility 4 of which are True and False but it is not a #Boolean value but to get there is going to take some work…
get-scomrule | get-member -name Enabled

PS D:\> get-scomrule | get-member -name Enabled

   TypeName: Microsoft.EnterpriseManagement.Configuration.ManagementPackRule

Name    MemberType Definition
—-    ———- ———-
Enabled Property   Microsoft.EnterpriseManagement.Configuration.ManagementPackMonitoringLevel Enabled {get;set;}

#BING Microsoft.EnterpriseManagement.Configuration.ManagementPackMonitoringLevel
#Find the MPRULES properties
#Then click on the link to the enumeration, which is

#Scroll down to find the possible members of the enabled value which are:

#how to remove white space
$agent = Get-SCOMAgent
$agent | Group PrimaryManagementServerName -Noelement | sort Name | select Name, Count

#white space removed
$agent = Get-SCOMAgent
$agent | Group PrimaryManagementServerName -Noelement | sort Name | Format-Table Name, Count -auto