Download the copy of the portQry from the below link
Below command checks if Remote computer TCP Port 445 is open or closed
PortQry.exe -n <IPAddress> -e 80 -p TCP
Below command checks if Remote computer UDP Port 445 is open or closed
PortQry.exe -n <IPAddress> -e 80 -p TCP
Below command checks if Remote computer TCP and UDP Port 445 is open or closed
PortQry.exe -n <IPAddress> -e 80 -p BOTH
Below command check if all the local computer port is open
PortQry.exe -local