Found this one in my toolkit recently and thought I’d share. It’s a little old so the code could do with some optimizing..
What it does:
Prompts the script runner for a client number and then asks them to confirm the name for new management pack. If the operator types ‘yes’ (highly sophisticated coding) then a new management pack will be created with the desired naming convention
Our naming convention in this particular environment is to have all 3 client numbers at the beginning of the management pack name.
Along the same line as this post, the below will create an empty overrides management pack based on a source management pack and client number
These are meant for the SCOM operators to use for consistent management pack naming.
Enjoy Dan!
$ManagementServer = "SCOM01" $orgmanagementpackname = read-host "Enter Search Criteria" ### # Find the managementpacks which fit the filter documented in $orgmanagementpackname ### $managementpackslist = Get-SCOMManagementPack -ComputerName $ManagementServer |where{$.DisplayName -like "$orgManagementPackName" -and $.
So use this wisely…
This script will use Out-Gridview to prompt the operator for the management pack to disable the alerts for and the override management pack to save those overrides in.
Enjoy! Dan
First, the script to do this for all monitors:
Import-module operationsmanager $SCOMServer = "<SCOMServerName>" New-SCOMManagementGroupConnection -ComputerName $SCOMServer $MPSource = get-scommanagementpack -ComputerName $SCOMServer | where {$.Sealed -eq $True} | Out-GridView -Title "Select a single SOURCE Management Pack" -PassThru $MPOverride = get-scommanagementpack -ComputerName $SCOMServer | where {$.
Moving SCOM 2012 R2 operationsdatabase to SQL Cluster. Process derived from this TechNet article http://technet.microsoft.com/en-au/library/hh278848.aspx Quick overview of the environment Versioning of my environment: System Center Operations Manger 2012 R2 w/ Update Rollup 4 SQL Server 2012 SP1 CU8 Windows Server 2012 R2
Existing servers and role: OM01 - Management Server OM02 - Management Server OM03 - Management Server OMSDB\OMDB - Operations Database Server / SQL Server 2012 SP1 OMSDW\OMDW - Data Warehouse Server / SQL Server 2012 SP1
Recently had a client request to monitor for WMI leaks and receive alerts when the WMI process starts to consume resources.
Obviously there are other methods for monitoring and/or reporting on this, but in environments without access to these tools or the freedom to apply hotfixes (Yes, I have a client s with these types of restrictions), this method is suitable to their needs.
I’ve blogged a performance rule here but if you want to receive an alert, below will achieve this for you.
Create a rule to view the memory usage of WMI process in Windows 2008/2008 R2 (and 2012/2012 R2) agent managed computers.
As described here by Kevin Holman, there is a known WMI (KB981314) leak in 2008 R2 and Win 7 operating systems.
For those who want a to monitor and alert for this, here is how to do it.
(Note: Obviously there are other methods for reporting on the presence of the hotfix but for those without the luxury, this will be a nice little help)
Just a quick note on how to enable agent proxy via PowerShell
Assumptions in this scenario:
SCOM 2012 R2 - UR3 Using Operations Manager Shell You want all Agents with proxy enabled Some basics:
Get-SCOMAgent
Let’s limit our scope..
Get-SCOMAgent | where {$.ProxyingEnabled -match $False}
Let’s enable the proxy for all listed agents
Get-SCOMAgent | where {$.ProxyingEnabled -match $False} | Enable-SCOMAgentProxy
Check the Agents again..
Get-SCOMAgent | where {$_.ProxyingEnabled -match $False}