Advertisement

03.03.2008 at 08:41AM PST, ID: 23209851
[x]
Attachment Details

Use dsquery dsmod

Asked by cavalierlan in Active Directory

Tags: Microsoft, Active Directory

I'm trying to pipe a dsquery to a dsmod to change the company attribute of all users in a certain OU.

If I type: (removed my domain name for posting)
dsquery user "ou=Cav USERS TEST,ou=Cavalier USERS,ou=Cavalier,dc=domain,dc=domain,dc=domain,dc=domaindc=domain"
I got a list of the four test users returned from this query.

I then | that to a dsmod -company mycompanyname.  This looks like this
dsquery user "ou=Cav USERS TEST,ou=Cavalier USERS,ou=Cavalier,dc=domain,dc=domain,dc=domain,dc=domaindc=domain" | dsmod -company mycompanyname

This returns an error
dsquery failed:A referral was returned from the server.

I've tried it a number of different ways, but can't get it to work

What's the proper syntax to get the dsmod to change the company attribute for all users in a certain OU?Start Free Trial
[+][-]03.03.2008 at 08:56AM PST, ID: 21033367

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Directory
Tags: Microsoft, Active Directory
Sign Up Now!
Solution Provided By: farhankazi
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.03.2008 at 08:57AM PST, ID: 21033384

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2008 at 09:01AM PST, ID: 21033423

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2008 at 09:07AM PST, ID: 21033506

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2008 at 10:16AM PST, ID: 21034099

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2008 at 07:32PM PST, ID: 21038090

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628