Modify AD Accounts, PowerShell

mvalencia2003 used Ask the Experts™
Is there a way to modify AD Accounts: add a set of groups, add a home drive path, info into Notes in Telephone tab , add a mailbox , add a address to SMTP (Exchange Console) , enable MS Lync account .. by using PowerShell?

Something like this:

Add-PSSnapin -Name Quest.ActiveRoles.ADManagement

Get-QADUser 'username' | Get-QADMemberOf |  % {Add-QADGroupMember -Identity $_ -Member '<newusername>'}

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2015
Hi mvalencia,

Yes, everything mentioned can be done via powershell. you would need a module or snapin for these though.

enabling the user to use Lync would need the Lync Module, adding a mailbox the Exchange Snapin, and the rest can either be done by Quest Tools or the ActiveDirectory Module.

The commands you are looking for are:
Add-ADgroupMember  (Group memberships)
Set-ADUser (Add Home Drive Paths, Add Telephone attribute values)

New-Mailbox (To create a user from scratch - You'll still need the AD commands for some attributes)
New-MailUser (Enable a user that is already created)

Enable-CSUser (to enable the account to use lync and assign a SIP address)

If you have specific detail you would like to go into, fire away with your questions,



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial