so have interesting script trying figure out, need change custom attribute value new one. problem both users , computers , not specific groups. instance value might billing1 several users in ou , need billing2. need find instance of value of billing1 , change billing2 not knowing user or computer object. can change 1 @ time if know user using set-aduser, set-adcomputer , set-adobject need figure out find , replace function.
i have searched , have found examples of can use csv users , computers again don't know has since value in attribute can vary , changes if reorg happens.
got correct script...
get-adcomputer -properties enterattributename -filter {enterattributename -like "value search" } |set-adcomputer –replace @{ enterattributename =”value change”}
this can applied get-aduser , get-adobject
Comments
Post a Comment