I need to find out what server ports are listening on port 3389. I have to check 2500 servers, some in different vlans, to make sure remote desktop is enabled.
Can netstat be used to check this and used against a ip range.. or would it be best to use powershell command
new-object system.net.sockets.TCPclientList xsevernamex, 3389
I prefer powershell. Let me know if this needs any adjustments. input.txt is just a list of computers.
nmap
is great for this:will result in an XML file you can parse programatically, but other output options also exist.