Change user attributes using Windows PowerShell

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

Leave a Reply

Your email address will not be published. Required fields are marked *