Hilton Giesenow
Hilton Giesenow
In Get-SPServerForRemoteServer and Invoke-RemoteWebRequest, if a failure occurs, it's hidden by a 2nd failure in the Finally Block. It should instead be if ($remoteSession -ne $null) { Disconnect-RemoteSession $remoteSession }
Something like: Invoke-Command -ComputerName [servers array] -ScriptBlock { Enable-PSRemoting Register-PSSessionConfiguration -Name 'SpFarmPosh' -RunAsCredential (Get-Credential) }
just logging for now - some environments might struggle to send the monitoring mail itself if it's quite large (problematic environment) so the tool might need an option to instead...
Check the OS Version + Patch level match (and server time) across a "Farm" scenario
The commands we need are pretty well defined. If there's support for this (let me know) it would probably be quite easy to set up a JEA package of these...