Mark Telliers blog

May 24, 2007

DSQUERY Computer

Filed under: Scripting — Tags: — mtellier @ 11:34 am

DSQUERY is another simple command line utility for searching Active Directory. If it’s in AD, this tool can find it.

List the DN of all computer accounts:
dsquery computer

List all computers that have been inactive for the last 6 weeks:
dsquery computer -inactive 6

List all domain controllers:
dsquery server

List all computers within a specific OU:
dsquery computer ou=servers,dc=bigdog,dc=com

Refer to the DSQUERY Command Line Reference on Microsoft TechNet.

About these ads

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The WordPress Classic Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: