Skip to content

Instantly share code, notes, and snippets.

@ddhahn
Created February 1, 2013 16:28
Show Gist options
  • Save ddhahn/4692369 to your computer and use it in GitHub Desktop.
Save ddhahn/4692369 to your computer and use it in GitHub Desktop.
Add a list of AD computers to a group
#needs to be adapted to eliminate the need for Quest AD add in and use the built-in AD stuff in
#POSH 2.0
$machines = Get-Content "c:\temp\machines.txt"
foreach ($machine in $machines) {
Add-QADGroupMember "GroupName" -Member "contoso\$machine$"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment