June 22, 2008
1:36 am
Automating port monitoring using PowerShell
Boris Yanushpolsky developed a script that demonstrates how “Automating port monitoring using PowerShell.” In order to run the script, you need to open the OpsMgr Command Shell and run the following:
CreatePortMonitoring.ps1 -serverName:'TargetServerName.contoso.com' -portNumber:'80' -pollIntervalSeconds:'120' -watcherNodes:"watcher1.contoso.com", "watcher2.contoso.com" -displayName:'Test URL monitoring' -targetMP:'Port Monitoring MP'
Note: If you specify the interval less than 1 minute, the monitoring should still work but you will not be able to load the configuration page and will see a UI error.
Download: Script
Loading

Leave a comment »