Well, documentation seems a bit inconsistent.
According to this (via "nslookup specify server port"):
In the nslookup console you can just type:
set port=545
To set the server port. In theory that means on the command line you can do:
nslookup -port=545 something.com 127.0.0.1
However I tried this on Windows 7 and it had no effect. Interestingly, the in-console help does not show port
as a valid option on my system, yet clearly it knows about the option because set po=123
sets port
(according to set all
). So I can't really explain how it knows to expand po to port but does not list port as an option and does not honor it.
There is a second nslookup doc that states something different, though. For whatever reason Windows 7 is conspicuously skipped in the "applies to" list so I can't test it, but that says you can do the following for other versions of Windows:
nslookup /set port=545 something.com 127.0.0.1
My version of nslookup does not have a /set option, though.
In any case type nslookup /?
and see what your options are.
Also what version of Windows? – Jason C – 2014-06-28T06:39:26.420