0

I am investigating a way to update the "telephone field" for a large group of users within Active Directory? I would like to match all users with their new phone number as they have moved offices.

I'd like to use DSQUERY/DSMOD to do this but don't know how to match up %username% with the users new phone number which would be in a *.csv file.

JJJJNR
  • 870
  • 6
  • 20
  • 32
  • When I run the following dsquery user -samid username "OU=Sale,OU=LONDONSALES,DC=XXXXXX,DC=XXXXXX,DC=com" | dsmod user -tel "8000" -u xxx -p xxx I get the following: dsquery failed:'OU=sales,OU=LONSALES,DC=XXX,DC=XXXX,DC=com' is an unknown parameter. type dsquery /? for help.dsmod failed:'Target object for this command' is missing. – JJJJNR Aug 28 '13 at 09:34
  • dsquery user -samid “me” “OU=Systems,OU=Production Services,DC=xxxx,DC=xxxx,DC=com” | dsmod user -tel “xxxx” -u xxxxx -p xxxxx – JJJJNR Aug 28 '13 at 13:21

1 Answers1

1
dsquery user -samid "me" "OU=Systems,OU=Production Services,DC=xxxx,DC=xxxx,DC=com" | dsmod user -tel "xxxx" -u xxxxx -p xxxxx

Big help from this blog post.

jscott
  • 24,484
  • 8
  • 79
  • 100
JJJJNR
  • 870
  • 6
  • 20
  • 32