I'm trying to make a simple script on cmd (bat file) to check if couple of remote servers are up and up running
i wanted to ping a specific ip and port.
when i got %ERRORLEVEL% = 1 i knew there was a problem
and when i got %ERRORLEVEL% = 0 the server was ok
after some fooling around with ping command i saw that you can't ping a specific port...
then i tried using telnet on my script and telnet dosent return any value (to what i could find) if there is a successful Session or not
if anyone got any other way to check if couple servers are running for a script i would appreciate the help. Thanks
if you are using windows, why don't you use PowerShell. here is a sample code to ping to a specfic port
TNC -ComputerName SQLServer01 -Port 1433
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With