Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Add Computer to Security Group with PowerShell

$
0
0

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.


Viewing all articles
Browse latest Browse all 3333

Trending Articles