Advertisement

Last time I had the situation that an employee switched from one department to another, thus all security groups need to get updated. If this is the case, you can simply copy the Active Directory groups from another user of the new department.
Although this is just a very simple one-liner, it is still a very useful command and can save a lot of time.

Import-Module ActiveDirectory
Get-ADUser -Identity <copyFromUser> -Properties memberof | Select-Object -ExpandProperty memberof | Add-ADGroupMember -Members <updateThisUser>
 
 

Advertisement
Advertisement
Previous articleHow to find your available .com domain
Next articleExchange Server 2010 Shared mailbox: Save sent items in the source mailbox

LEAVE A REPLY

Please enter your comment!
Please enter your name here