Network Administrator Knowledgebase

Nov 25 2007   8:38PM GMT

One Line Commands



Posted by: Michael Khanin
Networking, Windows Computing

I’m posting some of my favorite scripts on blog and on my site (http://thesystemadministrator.com). Now, I’d like to show few of “one line commands” scripts. The command entry should all be on one line.

Domain Controllers
Nltest /dclist:%userdnsdomain%

Domain Controller IP Configuration
for /f %i in (‘dsquery server -domain %userdnsdomain% -o rdn’) do psexec \\%i ipconfig /all


AD Database disk usage
for /f %i in (‘dsquery server -domain %userdnsdomain% -o rdn’) do dir \\%i\admin$\ntds

Comment on this Post

Leave a comment: