PowerTip: Add Computer to Security Group with PowerShell

PowerTip: Add Computer to Security Group with PowerShell

  • Comments 12
  • Likes

Summary: Use Active Directory PoweShell cmdlets to add a computer to a security group.

Hey, Scripting Guy! Question How can I use Windows PowerShell to add a computer to a security group?

Hey, Scripting Guy! Answer Use the Add-ADGroupMember cmdlet, and remember to use the SAM account name on the computer:

To add a computer called “STATION01” to a security group called “RDPEnabled”:

ADD-ADGroupMember “RDPEnabled” –members “STATION01$”

Note  The SAM account name has a “$” added to its name.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • hallo?i need help?bro)

  • Good Tip !!!

  • I read an article about a facebook bug that received a lot of recognition. The bug was discovered by a Brazilian programmer and facebook payed him 33 thousand for the information. That is something that I would like to discover! http://www.polosecurity.com/en/services.html

  • Thanx it's work