Active Directory security groups can provide an efficient way to assign access to resources on your network.
Using the addMemberToSecGrp.ps1, you can add multiple users to an active directory sercurity group. The script will
- Retrieve an user's email address from a provided CSV
- It will then use the email address to find the SamAccountName from Active Directory
- Use the Add-ADGroupMember to add the SamAccount to the specified group
Important
Make sure to edit the script to fit your need.
Using the removeMemberFromScGrp.ps1, you can remove multiple users from an active directory security group. The script will:
- Retrieve user email address from CSV
- Use the email address to search through Active Directory for the SamAccountName associated with the email address
- Check if the SamAccountName exist
- Use Remove-ADGroupMember to remove the SamAccountName from the Active Directory security group