PowerTip: Add Computer To Security Group With PowerShell
Maybe your like
- Dev Blogs
- Scripting Blog [archived]
- PowerTip: Add Computer to Security Group with PowerShell
The “Hey, Scripting Guys!” blog has been retired. There are many useful posts in this blog, so we keep the blog here for historical reference. However, some information might be very outdated and many of the links might not work anymore.
New PowerShell content is being posted to the PowerShell Community blog where members of the community can create posts by submitting content in the GitHub repository.
Learn More
Doctor Scripto Scripter Show more Summary: Use Active Directory PoweShell cmdlets to add a computer to a security group.
How can I use Windows PowerShell to add a computer to a security group?
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.

-
Share on Facebook
- Share on X
-
Share on Linkedin
Author
Doctor ScriptoScripterThe "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.
0 comments
Discussion is closed.
Code of ConductRead next
December 26, 2013PowerShell Report for a Windows Failover Cluster
Doctor Scripto December 26, 2013 PowerTip: Display a Blinking Message by Using PowerShell
Doctor Scripto Stay informed
Get notified when new posts are published. Email * Country/Region * Select...United StatesAfghanistanÅland IslandsAlbaniaAlgeriaAmerican SamoaAndorraAngolaAnguillaAntarcticaAntigua and BarbudaArgentinaArmeniaArubaAustraliaAustriaAzerbaijanBahamasBahrainBangladeshBarbadosBelarusBelgiumBelizeBeninBermudaBhutanBoliviaBonaireBosnia and HerzegovinaBotswanaBouvet IslandBrazilBritish Indian Ocean TerritoryBritish Virgin IslandsBruneiBulgariaBurkina FasoBurundiCabo VerdeCambodiaCameroonCanadaCayman IslandsCentral African RepublicChadChileChinaChristmas IslandCocos (Keeling) IslandsColombiaComorosCongoCongo (DRC)Cook IslandsCosta RicaCôte dIvoireCroatiaCuraçaoCyprusCzechiaDenmarkDjiboutiDominicaDominican RepublicEcuadorEgyptEl SalvadorEquatorial GuineaEritreaEstoniaEswatiniEthiopiaFalkland IslandsFaroe IslandsFijiFinlandFranceFrench GuianaFrench PolynesiaFrench Southern TerritoriesGabonGambiaGeorgiaGermanyGhanaGibraltarGreeceGreenlandGrenadaGuadeloupeGuamGuatemalaGuernseyGuineaGuinea-BissauGuyanaHaitiHeard Island and McDonald IslandsHondurasHong Kong SARHungaryIcelandIndiaIndonesiaIraqIrelandIsle of ManIsraelItalyJamaicaJan MayenJapanJerseyJordanKazakhstanKenyaKiribatiKoreaKosovoKuwaitKyrgyzstanLaosLatviaLebanonLesothoLiberiaLibyaLiechtensteinLithuaniaLuxembourgMacau SARMadagascarMalawiMalaysiaMaldivesMaliMaltaMarshall IslandsMartiniqueMauritaniaMauritiusMayotteMexicoMicronesiaMoldovaMonacoMongoliaMontenegroMontserratMoroccoMozambiqueMyanmarNamibiaNauruNepalNetherlandsNew CaledoniaNew ZealandNicaraguaNigerNigeriaNiueNorfolk IslandNorth MacedoniaNorthern Mariana IslandsNorwayOmanPakistanPalauPalestinian AuthorityPanamaPapua New GuineaParaguayPeruPhilippinesPitcairn IslandsPolandPortugalPuerto RicoQatarRéunionRomaniaRwandaSabaSaint BarthélemySaint Kitts and NevisSaint LuciaSaint MartinSaint Pierre and MiquelonSaint Vincent and the GrenadinesSamoaSan MarinoSão Tomé and PríncipeSaudi ArabiaSenegalSerbiaSeychellesSierra LeoneSingaporeSint EustatiusSint MaartenSlovakiaSloveniaSolomon IslandsSomaliaSouth AfricaSouth Georgia and South Sandwich IslandsSouth SudanSpainSri LankaSt HelenaAscensionTristan da CunhaSurinameSvalbardSwedenSwitzerlandTaiwanTajikistanTanzaniaThailandTimor-LesteTogoTokelauTongaTrinidad and TobagoTunisiaTurkeyTurkmenistanTurks and Caicos IslandsTuvaluU.S. Outlying IslandsU.S. Virgin IslandsUgandaUkraineUnited Arab EmiratesUnited KingdomUruguayUzbekistanVanuatuVatican CityVenezuelaVietnamWallis and FutunaYemenZambiaZimbabwe I would like to receive the Scripting Blog [archived] Newsletter. Privacy Statement. Subscribe Follow this blogEnter the destination URL
URL Link Text Open link in a new tabOr link to existing content
Search No search term specified. Showing recent items. Search or use up and down arrow keys to select an item. CancelCode Block
Paste your code snippet Ok CancelTag » Add Computer Account To Group Powershell
-
Add Computer To Group Using Add-ADGroupMember - ShellGeek
-
Add Computers To Group Using ADD-ADGroupMember Cmdlet
-
How To Add And Remove AD Groups And Objects In Groups With ...
-
[SOLVED] Bulk Adding Computer To Group - Spiceworks Community
-
Adding Active Directory Users, Groups And Computers With PowerShell
-
How To Add And Remove AD Groups And Objects In Groups ... - Lepide
-
Active Directory PowerShell Script To Add Computers To AD Group
-
How To Add User To Group In PowerShell With Add-ADGroupMember
-
Create Computer Objects In Active Directory Using PowerShell
-
Powershell Script To Add A User To A Local Admin Group
-
Add-DRAGroupMembers - NetIQ Directory And Resource ...
-
Powershell - Adding Computers To A Security Group In Active Directory
-
Bulk Add Computers To AD Group : R/PowerShell - Reddit
-
Refresh Membership In AD Security Groups Without Reboot Or Logoff