Solved

dsquery question

Posted on 2012-04-08
5
1,261 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 77

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Know what services you can and cannot, should and should not combine on your server.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

895 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

11 Experts available now in Live!

Get 1:1 Help Now