Active Directory PowerShell Script to Add Computers To AD Group. One of my friends helped me get a PowerShell script that will help 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 a list of computers (hostnames) as shown in the below screenshot.
Replace the GROUPNAME with the actual group name which you want to use.
Download the script from – TechNet Gallery
The output will be as shown below.
Anoop is Microsoft MVP! He is a Solution Architect in enterprise client management with more than 20 years of experience (calculation done in 2021) in IT. He is a blogger, Speaker, and Local User Group HTMD Community leader. His main focus is on Device Management technologies like SCCM 2012, Current Branch, and Intune. E writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc…