Batch Processing Guide: Adding Multiple Users to an Active Directory Group Using PowerShell
The code in powershell: Get-Content ‘gebruikers.txt’ | ForEach-Object { Add-ADGroupMember -Identity ‘G_Group_to_add_members’ -Members $_ } This one-liner works as follows: Get-Content ‘gebruikers.txt’: This command reads the contents of the file ‘gebruikers.txt’. Each line in this file should ideally contain a username that you want to add to a specific group. Pipe (|): The […]