Solved

dsquery question

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

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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

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…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
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…

752 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