Change user attributes using Windows PowerShell

Share this:

Hello folks,

Sometimes we should alter attributes

get-qaduser | foreach-object { set-qaduser $_.name -ObjectAttributes @{mail = $_.name + ‘domain.ca’ } }

Ok, Is it not enough? You want to change only for the determined users which belongs to certain OU.. ok.. let’s go:

get-qaduser -searchpath ‘ou=user, dc=apatricio,dc=local’ | foreach-object { set-qaduser $_.name -ObjectAttributes @{mail = $_.name + ‘domain.ca’ } }

Best Regards,
Anderson Patricio

Written by Anderson Patricio

Anderson Patricio

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange and several other certifications. Anderson has been contributing to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at ITPROCentral.com, MSExchange.org, Techgenix.com and Anderson Patricio.org (Portuguese).