Billetkontoret
asked on
Script to update "Street" on users in AD
Hi guys.
We are switching to a new address and I therefore want to update the "Street" field on my users in AD. I don't want to do this by hand but with a script.
Can you please help me with this? I have no experience with vbs.
I want to update all users in the ou:Employees,ou:DK,ou:test . And the new value for "Street" should be "teststreet".
Thank you all.
We are switching to a new address and I therefore want to update the "Street" field on my users in AD. I don't want to do this by hand but with a script.
Can you please help me with this? I have no experience with vbs.
I want to update all users in the ou:Employees,ou:DK,ou:test
Thank you all.
Copy paste the query which i posted above in command prompt
cheers,
Prem
cheers,
Prem
ASKER
Thank you.
I get this error:
dsmod failed:`-street' is an unknown parameter.
I am running it on my Win 2003 DC.
I get this error:
dsmod failed:`-street' is an unknown parameter.
I am running it on my Win 2003 DC.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This is a screenshot of the tool in action.
1.jpg
1.jpg
HI,
You can do the same with the saved queries.
create a saved queiries in ADUC by following the link below
http://www.windowsecurity.com/articles/Using-Saved-Queries.html
@ Query Root point the OU
@ Define Query -> Common queries -> User tab -> Name start with *
click ok
so it will display all the users in that OU
Select all users go to address tab and update the street
Let me know if you any issue
the link above will guide u step by step
Also refer:
http://www.petri.co.il/saved_queries_in_windows_2003_dsa.htm
Good Luck
Cheers,
Prem
You can do the same with the saved queries.
create a saved queiries in ADUC by following the link below
http://www.windowsecurity.com/articles/Using-Saved-Queries.html
@ Query Root point the OU
@ Define Query -> Common queries -> User tab -> Name start with *
click ok
so it will display all the users in that OU
Select all users go to address tab and update the street
Let me know if you any issue
the link above will guide u step by step
Also refer:
http://www.petri.co.il/saved_queries_in_windows_2003_dsa.htm
Good Luck
Cheers,
Prem
ASKER
This is a great tool!
Check this to modify the street
dsquery user ou=Employees,ou=DK,ou=test
Let me know if you have any issue
Cheers,
Prem
Open in new window