Posts

Showing posts from June, 2022

Approve pending agents from file

First dump pending agents to file: Get-SCOMPendingManagement | sort AgentName | select -ExpandProperty AgentName | Out-File C:\Temp\agents.txt Remove any agents you don't want from the file then run this to approve them: $a=gc C:\Temp\agents.txt foreach ($i in $a) {Get-SCOMPendingManagement | where {$_.AgentName -eq $i} | Approve-SCOMPendingManagement}

DHCP monitoring

When I initially implemented my framework I disabled a lot of rules and monitors for DHCP management packs. At the time I did this I used these management packs: Microsoft.Windows.DHCPServer.2012 - 6.0.7309.0 Microsoft.Windows.DHCPServer.2012.R2 - 6.0.7309.0 Microsoft.Windows.DHCPServer.Library - 10.1.0.1 Microsoft.Windows.DHCPServer.2016 - 10.1.0.1 I used these for scope monitoring: Microsoft.Windows.DHCPServer.2012.AllIndScope.IPV4.FreeScopeAddresses.Percentage.Monitor Microsoft.Windows.DHCPServer.10.0.AllIndScope.IPV4.FreeScopeAddresses.Percentage.Monitor The classes for the 2 monitors are respectively: Microsoft.Windows.DHCPServer.2012.IPv4ScopesRuntime Microsoft.Windows.DHCPServer.10.0.IPv4ScopesRuntime If you do a get-scomclassinstance on these you'll probably find there aren't any, making this monitoring useless. To confirm this go to  Microsoft Windows Server DHCP > Scope Health  in the console and you'll see all health states are not monitored. So, we need to d

Cluster disk monitoring

When I initially implemented my framework I disabled a lot of rules and monitors for cluster disks because honestly, I don't know if they are useful. At the time I did this I used these management packs: Microsoft.Windows.Cluster.Library - 7.0.8437.17 Microsoft.Windows.2012.Cluster.Management.Library - 10.0.6.6 Microsoft.Windows.2008.Cluster.Management.Library - 10.0.6.6 Microsoft.Windows.2008.Cluster.Management.Monitoring - 10.0.6.6 Microsoft.Windows.2012.R2.Cluster.Management.Monitoring - 10.0.6.6 Microsoft.Windows.2012.R2.Cluster.Management.Library - 10.0.6.6 Microsoft.Windows.2012.R2.Cluster.Management.Monitoring.Overrides - 10.0.6.6 Microsoft.Windows.2012.Cluster.Management.Monitoring - 10.0.6.6 Microsoft.Windows.2016.Cluster.Management.Library - 10.1.0.0 Microsoft.Windows.Cluster.Management.Library - 10.1.0.0 Microsoft.Windows.Cluster.Management.Monitoring - 10.1.0.0 Microsoft.Windows.2016.Cluster.Management.Monitoring - 10.1.0.0 Microsoft.Windows.Server.ClusterSharedVolumeMo

Using a Run As account for a rule

Here's an MP that demonstrates how to run a rule with a VBScript using a specific Run As account in SCOM.