You get a helpdesk ticket that a user needs to be added to an AD group. A quick command in PowerShell is all you need. By the time Active Directory Users and Computers opens, you’re closing the ticket.
Open a PowerShell prompt:
Add-ADGroupMember NameOfADGroup userID09
To confirm the account is there, run this:
Get-ADGroupMember NameOfADGroup | select SamAccountName | sort-object SamAccountName -descending
Be sure to import the Active Directory module.
If using Windows 7 or Windows 10 download the Remote Server Administration Tools & Install.
If your using a server, add the feature, Active Directory module for Windows PowerShell.
If you need to delete a user from a group:
Remove-ADGroupMember NameOfADGroup userID09
I’m human. Someone asked me how to get to Active Directory Users and Computers (ADUC) on a 2008 R2 and my first response was, look under Administrative Tools. Well, as luck would have it, it’s not there. Where is it, MMC? admintools? adminpak? I wasn’t sure. This is a new server and not under my purview so I just assumed it was there. Sometimes I think I’ve forgotten more that I remember, but then, It dawned on me, this is 2008R2 and EVERYTHING is either a role or a feature.
How to add Active Directory Users and Computers to a Windows 2008 R2 Server
- Launch Server Manager
- Click on/Expand Features
- Click Add Features
- Scroll down and expand Remote Server Administration Tools
- Expand Role Administration Tools + AD DS and AD LDS Tools
- Select AD DS Snap-Ins and Command-line Tools
- Click Next. Confirm installation selections and Click install.
- Click Close when the installation succeeds.