Monday, May 19, 2014

Exchange 2010 - Random Scripts 1

Exchange 2010 - powershell scripts.

The next few posts are going to contain ps scripts I have created supporting Exchange 2010 over the past 4 years.



# script to alter the value of "employeeID" since empID is not regularly returned from get/set-qaduser
# you have to tell the command to look for it as an includedproperty, then an objectattribute.
# requires ps snapin from
# http://www.quest.com/activeroles-server/arms.aspx
# then register the snapin with Register the snap-in. (Key point)
# add-PSSnapin quest.activeroles.admanagement
# bhart
get-qaduser -searchroot "ou=orgunit,dc=domain,dc=org" -includedproperties "employeeID" |
set-qaduser -objectattributes @{"employeeID"="value to be changed"} |
get-qaduser -includedproperties "employeeID" |
select name,employeeID #this displays the results in a table by name and the value of employeeID





Script's here come with no support, but feel free to use my code or bits of it in your own scripts.

No comments:

Post a Comment