Network Administrator Knowledgebase

Nov 25 2007   8:38PM GMT

One Line Commands

Michael Khanin Michael Khanin Profile: Michael Khanin

I’m posting some of my favorite scripts on blog and on my site ( 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

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: