Depending on requirements, creating multiple subscriptions within SCOM to leverage subscriber/channels required. Selecting rules/monitors, and resolution state conditions to help Application teams get incidents for key issues requiring intervention. NOTE Depending on what was command channels were created for various AssignmentGroup(s) and Team(s) within the organization.
Configure ‘TEST Holman’s Command Channel’ subscription
Configure channel to execute logAlert.ps1 command channel to verify SCOM outputs
SCOM Navigation steps:
Click on Administration Tab > Notifications > Channels
Click New
Name
TEST Holman’s Command Channel
Description
C:\MonAdmin\Scripts\LogAlert.ps1 Utilize LogAlert.ps1 example from Holman’s blog. Specific Subscription details: +CRITERIA = ALL Alerts +RESOLUTIONSTATE = NEW (0) +SUBSCRIBER = CHANNEL SCOM Command Channel Subscriber via POWERSHELL +CHANNEL Test LogAlert.ps1 SCOM Command Channel
Setup and use Holman’s script execution channel blog to test what account SCOM uses for notifications
https://kevinholman.com/2021/08/25/what-account-will-command-channel-notifications-run-as-in-scom/
Click on Settings
Example screenshot from Holman’s blog
Full path of Command file:
C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
Command line parameters
-executionPolicy bypass -noprofile -file “C:\MonAdmin\scripts\logalert.ps1” -AlertID “$Data[Default=’NotPresent’]/Context/DataItem/AlertId$” -AlertName “$Data[Default=’NotPresent’]/Context/DataItem/AlertName$” -AlertDescription “$Data[Default=’NotPresent’]/Context/DataItem/AlertDescription$” -Severity “$Data[Default=’NotPresent’]/Context/DataItem/Severity$” -ResolutionState “$Data[Default=’NotPresent’]/Context/DataItem/ResolutionState$” -ManagedEntityPath “$Data[Default=’NotPresent’]/Context/DataItem/ManagedEntityPath$” -ManagedEntityDisplayName “$Data[Default=’NotPresent’]/Context/DataItem/ManagedEntityDisplayName$” -ManagedEntityFullName “$Data[Default=’NotPresent’]/Context/DataItem/ManagedEntityFullName$” -ManagedEntity “$Data[Default=’NotPresent’]/Context/DataItem/ManagedEntity$” -CreatedByMonitor “$Data[Default=’NotPresent’]/Context/DataItem/CreatedByMonitor$” -WorkflowId “$Data[Default=’NotPresent’]/Context/DataItem/WorkflowId$” -DataItemCreateTimeLocal “$Data[Default=’NotPresent’]/Context/DataItem/DataItemCreateTimeLocal$” -WebConsoleUrl “$Target/Property[Type=”Notification!Microsoft.SystemCenter.AlertNotificationSubscriptionServer”]/WebConsoleUrl$?DisplayMode=Pivot&AlertID=$UrlEncodeData/Context/DataItem/AlertId$”
Startup folder for the command line:
C:\MonAdmin\SCRIPTS
Click Finish
Configure New-SNOWEvent command channel in SCOM
Grab file from GitHub repository https://github.com/theKevinJustin/New-SNowEvent
As needed, save TXT file as .ps1 on SCOM MS’s
Design recommendation
Create multiple command channels depending on assignment group and team(s) to pass these variables to the script.
NOTE path to setup channel execution, AssignmentGroup, and Team variables
Configure ‘TEST SNOW Event Creation’ SCOM Notification command channel
NOTE Use these steps to create multiple command channels, as the AssignmentGroup and Team may differ depending on Application Owners
SCOM Navigation steps:
Click on Administration Tab > Notifications > Channels
Click New
Name
TEST SNOW Event Creation
Description
C:\MonAdmin\Scripts\New-SNowEvent.ps1 Outputs 711 Events into Operations Manager event log.
Specific Subscription details: +CRITERIA = ALL Alerts +SUBSCRIBER = CHANNEL New-SNowEvent.ps1 via POWERSHELL +CHANNEL ServiceNow SNOW Event Creation Channel
New-SNOWEvent.ps1 command channel creates ServiceNow SNOW events for alerts and incidents.
This channel will also update the SCOM alert TicketID, Owner, ResolutionState to modify SCOM alert with SNOW information, or information passed in SNOW event.
See blog for more details https://kevinjustin.com/blog/2024/03/27/servicenow-event-integration/
Click on Settings
Full path of Command file:
C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
Command line parameters
-executionPolicy bypass -noprofile -file “C:\MonAdmin\scripts\New-SNowEvent.ps1” -AlertID “$Data[Default=’NotPresent’]/Context/DataItem/AlertId$” -AlertName “$Data[Default=’NotPresent’]/Context/DataItem/AlertName$” -AssignmentGroup “JustinTime System Admin” -Team SYM
Startup folder for the command line:
C:\MonAdmin\SCRIPTS
Click Finish
Create new channel for New-SNowIncident.ps1
Grab file from GitHub repository https://github.com/theKevinJustin/New-SNOWIncidents
As needed, save New-SNowIncident file as .ps1 on SCOM MS’s
Design recommendation
Create multiple command channels depending on assignment group and team(s) to pass these variables to the script.
NOTE path to setup channel execution, AssignmentGroup, and Team variables
Configure ‘TEST SNOW Event Creation’ SCOM Notification command channel
NOTE Use these steps to create multiple command channels, as the AssignmentGroup and Team may differ depending on Application Owners
SCOM Navigation steps:
Click on Administration Tab > Notifications > Channels
Click New
Name
TEST SNOW Event Creation
Description
C:\MonAdmin\Scripts\New-SNowEvent.ps1 Outputs 711 Events into Operations Manager event log.
Specific Subscription details: +CRITERIA = ALL Alerts +SUBSCRIBER = CHANNEL New-SNowEvent.ps1 via POWERSHELL +CHANNEL ServiceNow SNOW Event Creation Channel
New-SNOWEvent.ps1 command channel creates ServiceNow SNOW events for alerts and incidents.
This channel will also update the SCOM alert TicketID, Owner, ResolutionState to modify SCOM alert with SNOW information, or information passed in SNOW event.
See blog for more details https://kevinjustin.com/blog/2024/03/27/servicenow-event-integration/
Click on Settings
Full path of Command file:
C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
Command line parameters
-executionPolicy bypass -noprofile -file “C:\MonAdmin\scripts\New-SNowEvent.ps1” -AlertID “$Data[Default=’NotPresent’]/Context/DataItem/AlertId$” -AlertName “$Data[Default=’NotPresent’]/Context/DataItem/AlertName$” -AssignmentGroup “JustinTime System Admin” -Team SYM
Startup folder for the command line:
C:\MonAdmin\SCRIPTS
Click Finish