PortQryV2.exe is a standalone binary from Microsoft. It appears that the last release was around the Server2003/XP days but it can still be downloaded and is still useful. Once downloaded, the installer file creates a directory and drops the PortQry.exe file in it. This is nice to have when a server is behind firewalls and troubleshooting is required.

A simple example that checks if port 445 is available using both TCP and UDP (445 is TCP – this is just an example to show use):

portqry.exe  -n myserver.mydomain.com -e 445 -p 

As always, get help:

portqry.exe /?