?
Solved

dsquery question

Posted on 2012-04-08
5
Medium Priority
?
1,397 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 17

Assisted Solution

by:Anuroopsundd
Anuroopsundd earned 668 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 79

Accepted Solution

by:
arnold earned 668 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 664 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
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…
Suggested Courses

719 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