Get-SCOMNotificationSubscription Dashboard view

Her er metoden til at få lavet et oversigtsbillede af subscriptions i SCOM 2012r2 PowershellGrid Dashboard.

$vagt=  Get-SCOMNotificationSubscription -DisplayName *VAGT*

$i=1

foreach ($navn in $vagt)
{
$dataObject =$ScriptContext.CreateInstance(“xsd://foo!bar/baz”)
$dataObject[“Id”] =[String] $i
$dataObject[“Navn”] = $navn.DisplayName
$dataObject[“Enabled”] = $navn.Enabled
$ScriptContext.ReturnCollection.Add($dataObject)
$i++

}

Dette viser navnet og om subscriptionen er enabled

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s