Get All logical disks and its overrides

Hello,

please help to write a query to find all logical disks for all windows servers and its all overrides for Logical Disk Free Space Monitor, is it possible?

For example

Hostname       | Parameter                                                   | Default Value | Override Value

somehost/D:   | Enabled                                                      | True              | False

somehost2/D: | Warning % Threshold for Non-System Drives | 10                 | 2

somehost3/D: | (no overrides) NULL

Thanks in advance

July 31st, 2013 11:10am

Hi

you can pull all overrides from scom server for a monitor

for windows 2003 serve

$mon = Get-SCOMMonitor -Name Microsoft.Windows.Server.2003.LogicalDisk.DefragAnalysis

Get-SCOMOverrideResult -Monitor $mon

for windows 2008 serve

$mon = Get-SCOMMonitor -Name Microsoft.Windows.Server.2008.LogicalDisk.DefragAnalysis

Get-SCOMOverrideResult -Monitor $mon

refer below link for more ways to pull overrides

http://technet.microsoft.com/en-us/library/hh920253(v=sc.10).aspx

Regards

Free Windows Admin Tool Kit Click here and download it now
July 31st, 2013 11:50pm

thanks for reply, I forgot to specify version of SCOM, we have 2007 R2.
August 1st, 2013 1:52am

Hi

you can pull all overrides from scom server for a monitor

for windows 2003 serve

$mon = Get-SCOMMonitor -Name Microsoft.Windows.Server.2008.LogicalDisk

Get-SCOMOverrideResult -Monitor $mon

for windows 2008 serve

$mon = Get-SCOMMonitor -Name Microsoft.Windows.Server.2008.LogicalDisk

Get-SCOMOverrideResult -Monitor $mon

refer below link for more ways to pull overrides

http://technet.microsoft.com/en-us/library/hh920253(v=sc.10).aspx

Regards

Free Windows Admin Tool Kit Click here and download it now
August 1st, 2013 6:48am

Hi 

you can use OverrideExplorer 3.6 to get list of overrides for a class or for a computer

download link

http://blogs.msdn.com/b/dmuscett/archive/2012/02/19/boris-s-tools-updated.aspx

regards

August 2nd, 2013 10:55am

Hi, maybe this will be helpful, additional method to retrieve effective values of overrides via script that can automate what you need.

add-pssnapin "Microsoft.EnterpriseManagement.OperationsManager.Client"
new-managementGroupConnection -ConnectionString:scomserver
set-location "OperationsManagerMonitoring::"

$Monitors = Get-Monitor | where {$_.name -match "Microsoft.Windows.Server.2008.LogicalDisk.FreeSpace" -and $_.displayname -match "Logical Disk Free Space"}
$Instances= Get-MonitoringClass | where {$_.displayName -match "Windows Server 2008 Logical Disk"} | Get-MonitoringObject | sort path
write-host "--------------start----------------"

foreach ($Instance in $Instances){
write-host $instance.path\($instance.name)


if ($Instance.GetResultantOverrides($Monitors[0]).resultantconfigurationoverrides.count -eq 1){
$Instance.GetResultantOverrides($Monitors[0]).resultantconfigurationoverrides.keys.displayname + "-" + $Instance.GetResultantOverrides($Monitors[0]).resultantconfigurationoverrides.values.effectivevalue
}
else {
for ($i=0; $i -lt $Instance.GetResultantOverrides($Monitors[0]).resultantconfigurationoverrides.count; $i++) {
$Instance.GetResultantOverrides($Monitors[0]).resultantconfigurationoverrides.keys.displayname[$i] + "-" + $Instance.GetResultantOverrides($Monitors[0]).resultantconfigurationoverrides.values.effectivevalue[$i]
}
}

if ($Instance.GetResultantOverrides($Monitors[0]).ResultantPropertyOverrides.count -eq 1) {
$Instance.GetResultantOverrides($Monitors[0]).ResultantPropertyOverrides.keys
$Instance.GetResultantOverrides($Monitors[0]).ResultantPropertyOverrides.values.effectivevalue
}
else {
$Instance.GetResultantOverrides($Monitors[0]).ResultantPropertyOverrides.keys[0] 
for ($i=0; $i -lt $Instance.GetResultantOverrides($Monitors[0]).ResultantPropertyOverrides.count; $i++) {
$Instance.GetResultantOverrides($Monitors[0]).ResultantPropertyOverrides.values.effectivevalue[$i]
}
}

write-host "------------------------------"
}

Free Windows Admin Tool Kit Click here and download it now
August 2nd, 2013 4:06pm

You can also create an override view in My Workspace.
August 3rd, 2013 4:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics