Today I had an agent with a heartbeat failure and in the Operations Manager Event Log there were 21006 error’s indicating that it couldn’t contact the Management Server. Firstly I wanted the check if this agent could contact the management server on port 5723. Unfortunately there were no telnet, portqry or network monitoring type tools or applications on this box. Naturally, it got me thinking about PowerShell.
So here’s a little function which you can use to test connectivity to any port, not just the SCOM agent one.
Test-Port ServerName 5723