Category: Powershell

1 commentsAuthoringManagement PacksPowershellSCOM 2012SCOM 2016

SCOMHelper PowerShell Module – A SCOM Admin’s Best Friend

(installation instructions at bottom) There are a number of cool scripts that I’ve collected, borrowed, and written in my travels as a SCOM field engineer and PowerShell enthusiast. I decided to put them all together into one module for easier maintenance and use. Enjoy. SCOMHelper Module Functions: New-SCOMClassGraph First and foremost my pride and joy ….  Read More

0 commentsAuthoringManagement PacksPowershellSCOM 2012SCOM 2016DataItemNotepad++powershellProperty BagText EditorXML Format

How to Analyze a SCOM Property Bag

From time to time I find myself writing PowerShell scripts for custom workflows: discoveries, rules, monitors, tasks, etc. Often times the project at hand requires a property bag full of juicy data to be used in the workflow. There are a handful of other blogs that describe what a property bag is but here I’ll ….  Read More

0 commentsManagement PacksPowershellSCOM 2012SCOM 2016Authoring Management PackspowershellPowershell SCOM Administration Operations Manager Shellscom 2012SCOM 2016Visual StudioVSAE

Visual Studio ‘Failed to verify module reference’ Authoring SCOM Management Pack, VSAE

Today I’m writing about an elusive problem with a management pack that I was authoring recently. I was writing a generic datasource for a registry discovery; that is a discovery that will instantiate a class based on the existence of a registry key on the Target machine, and generic because I will use a single ….  Read More

0 commentsManagement PacksPowershellSCOM 2012SCOM 2016

Export SCOM Rule and Monitor Knowledge Articles with PowerShell

This has been baked into the SCOMHelper PowerShell module available here. Related: How to Get Knowledge Article from a SCOM Alert with Powershell This will output workflow information (including Knowledge Article content) to an HTML report or CSV file. Script accepts one or more (or all) management pack objects as input. Can export from SCOM using ….  Read More

0 commentsPowershellSCOM 2012SCOM 2016Powershell SCOM Administration Operations Manager Shell

SCOM Operations Manager Shell PowerShell Error When Launched as Administrator

Sometimes when the Operations Manager Shell is opened as an Administrator you will see the error in the screenshot below. I believe this has to do with how User Account Control (or UAC) is configured. The “Start in” parameter on the shortcut is ignored and the shortcut is unable to locate the startup scripts.   ….  Read More

0 commentsPowershellSCOM 2012powershellscom 2012standalone certificate authoritywindows server 2012

Install Standalone CA (Certificate Authority) on Windows Server 2012 R2 for use with Operations Manager

After looking around a bit I couldn’t find a decent tutorial that addressed this specific scenario (not one that demonstrated Powershell anyway). I ended up writing this for a client who didn’t have their PKI infrastructure sorted out yet. I prefer to use Powershell as it is much faster and efficient for these steps. (Just ….  Read More

0 commentsManagement PacksPowershellSCOM 2016

How to Get Knowledge Article from a SCOM Alert with Powershell

I’ve had numerous requests lately for scripts to extract Knowledge Article info from alerts and workflows so I thought it might be helpful to post some scripts for the community to use. Download at TechNet Gallery Get-SCOMAlertKnowledge.ps1 This script is geared towards use with a connector, possibly for Service Manager ticketing or with SCORCH. This ….  Read More

0 commentsPowershellSCOM 2012

Set Primary and Failover Management Servers for Agent Managed Computers with Powershell

  Here’s an easy script to set the primary and secondary management servers for all agent managed computers in your management group. Just run this on any management server: $primaryMS = (Get-SCOMManagementServer | Sort-Object DisplayName )[0]   $failoverMS = (Get-SCOMManagementServer | Sort-Object DisplayName )[1]   Get-SCOMAgent | % { Set-SCOMParentManagementServer -Agent $_ -PrimaryServer $primaryMS; ` ….  Read More