Solved

dsquery question

Posted on 2012-04-08
5
1,248 Views
Last Modified: 2012-06-27
To display the pre-windows 2000 logon names of all users in the Sydney office, use this command:

dsquery user -office "Sydney" | dsget user -samid

dsquery failed:'-office' is an unknown parameter.

What am I doing wrong?

I am getting this example from the MCTS Exam 70-640 Training Kit, Page 122.

No URLs please.
0
Comment
Question by:motnahp00
5 Comments
 
LVL 17

Assisted Solution

by:Anuroopsundd
Anuroopsundd earned 167 total points
ID: 37822298
dsquery do not have office parameter. please see below link to check for valid parameters in dsquery

http://technet.microsoft.com/en-us/library/cc725702(v=ws.10).aspx
0
 
LVL 21

Author Comment

by:motnahp00
ID: 37822306
So what should be the correct syntax to accomplish the query?
0
 
LVL 76

Accepted Solution

by:
arnold earned 167 total points
ID: 37822484
Is Sydney a site, OU?
dsquery site | find "Sydney"
Switch site with OU.

You may have to chain queries.

Without knowing your structure it is hard to point out a specific solution

dsquery user -o "string from the earlier find"
0
 
LVL 11

Assisted Solution

by:Venugopal N
Venugopal N earned 166 total points
ID: 37822659
Office parameter is not available with dsquery

dsquery user domainroot | dsget user - smaid -office >> test.xls

The above command will list all the suer of current domain and with the samid and the office location.It will be export to an excel file and you can filter the file for the office location
0
 
LVL 21

Author Closing Comment

by:motnahp00
ID: 37980299
Thanks for helping.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now