Monitor a Remote Server - HiltonGiesenow/PoShMon GitHub Wiki

##WORK IN PROGRESS [intro]

Table of Contents

Read the short Prequisites guide before starting the items below.

$poShMonConfiguration = New-PoShMonConfiguration {
            OperatingSystem -EventLogCodes 'Error','Warning' -WindowsServices 'BITS'
        }
Invoke-OSMonitoring -PoShMonConfiguration $poShMonConfiguration -Verbose

We're now ready to add the next setting, which is the set of servers we want to monitor. This requires us to add the "General" configuration element, as follows:

$poShMonConfiguration = New-PoShMonConfiguration {
            General -MinutesToScanHistory 30 -ServerNames 'Server1','Server2'
            OperatingSystem -EventLogCodes 'Error','Warning' -WindowsServices 'BITS'
        }
Invoke-OSMonitoring -PoShMonConfiguration $poShMonConfiguration -Verbose

To make the example a little more complete, I've also told PoShMon how far back in time to go when analysing things like the Event Log history or any similar history logs (such as the Timer Job and User Profile Sync histories for SharePoint monitoring). If we now run this monitoring configuration, we'd get Verbose output similar to the following (below is just a snippet):

VERBOSE: Initiating 'Memory Review' Test...
VERBOSE: 	Server1 : 7.93 : 2.71
VERBOSE: 	Server2 : 7.93 : 2.81
VERBOSE: Complete 'Memory Review' Test, Issues Found: No