Powershell Script to Add Bulk Users / Computers to AD Group

As an IT Pro, we may have a requirement to add multiple users or computer in an Active Directory group. The below Powershell script can be used to add multiple user or computer to an AD group. The list of users / computers need to be provided in the text file.

Usage: See below example. To see full help Type script name and press enter. For adding the users or computer to AD group, you have to provide computer NetBIOS name or user name (SAM Account) in text file.

Add computer to AD Group    

.\AddObjectsToADGroup.ps1 -FileName Computers.txt -ADGroupName "TestGroup" -ObjectType Computer .

Add user to AD group    

.\AddObjectsToADGroup.ps1 -FileName Computers.txt -ADGroupName "TestGroup" -ObjectType User

You can also download the script from below link.

AddObjectsToADGroup

Related Posts:

Subscribe to Techuisitive Newsletter

Be the first to know about our new blog posts. Get our newsletters directly in your inbox and stay up to date about Modern Desktop Management technologies & news.

Leave a Comment

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

Scroll to Top