Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 17778

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 17778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>