System Center Operations Manager 2007 R2 | Tips and Tricks
Set Maintenance ModeFrom the OpsMgr PowerShell plugin, run:get-monitoringclass | export-csv c:\temp\classlist.csvOpen the csv file and search on TCP .. you’ll find 3 class entries for your “monitor” (you can see the actual name of the monitor two columns along from the following 3 class entries).TCPPortCheck_GUIDTCPPortCheck_GUIDGroupTCPPortCheck_GUIDWatcherComputerGroupOnce we know the class name, we can list the instances of that class that we have:get-monitoringclass –name TCPPortCheck_GUID| get-monitoringobjectOr in my example:I can see the display name of my class which is what I want to use to put the monitor in maintenance mode Run a Maintenance Mode script$rootMS="LDNOM07R2.”$TCPMonitorName = "Check Port 80 on my webserver"$minutes="10"$comment="Mostly Harmless"$reason="PlannedOther"Add-PSSnapin "Microsoft.EnterpriseManagement.OperationsManager.Client" -ErrorVariable errSnapin; Set-Location "OperationsManagerMonitoring::" -ErrorVariable errSnapin;new-managementGroupConnection -ConnectionString:$rootMS -ErrorVariable errSnapin;set-location $rootMS -ErrorVariable errSnapin; $TCPWatcher = (Get-MonitoringClass -name TCPPortCheck_8275b8b6585747dd9cf9cb9bd878a851) | Get-MonitoringObject | where {$_.DisplayName -eq $TCPMonitorName} $startTime = [System.DateTime]::Now$endTime = $startTime.AddMinutes($minutes) foreach ($name in $TCPWatcher) {New-MaintenanceWindow -startTime:$startTime -endTime:$endTime -monitoringObject:$name -comment:$comment -Reason:$reason } ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- tips and tricks for life
- operations manager responsibilities
- onenote tips and tricks 2019
- excel tips and tricks cheat sheet
- operations manager professional summary
- operations manager roles and responsibilities
- onenote tips and tricks pdf
- tips and tricks for cleaning
- operations manager skills and abilities
- system center operations manager
- iphone 11 tips and tricks 2020
- car tips and tricks video