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=domai
n,dc=domai
n,dc=domai
n,dc=domai
ndc=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=domai
n,dc=domai
n,dc=domai
n,dc=domai
ndc=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