Active Directory PowerShell Script to Add Computers To AD Group. One of my friends helped me to get a PowerShell script that will help to Add Computer Accounts To A Security Group.
I thought of sharing the same so that it will be helpful to somebody.
Active Directory PowerShell Script to Add Computers To AD Group
This will work only on Windows 2008 R2 Domain Controllers.
LISTOFCOMPUTERS.txt file is the input file and that should contain list of computers (hostnames) as shown in the below screenshot.
Replace the GROUPNAME with actual group name which you want to use.
Download the script from – TechNet Gallery
Output will be as shown below.