How To Add The User To The Local Administrators Group Using ...
Maybe your like
- Home
- Whiteboard
- Online Compilers
- Practice
- Articles
- AI Assistant
- Jobs
- Tools
- Corporate Training
- Courses
- Certifications
- Switch theme
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
To add the AD user or the local user to the local Administrators group using PowerShell, we need to use the Add-LocalGroupMember command.
To add the local user to the local Administrators group,
Add-LocalGroupMember -Group Administrators -Member TestUser -VerboseThe above command will add TestUser to the local Administrators group. You can provide any local group name there and any local user name instead of TestUser
You can also add the Active Directory domain user to the Local Administrators group by providing the domain name if the computer is in the same domain.
For example, we will add the Beta user from the AutomationLab domain as shown below.
Add-LocalGroupMember -Group Administrators -Member AutomationLab\BetaYou can provide the multiple members separated by comma (,) but only one local group is supported.
Add-LocalGroupMember -Group Administrators -Member TestUser, Testuser2 -VerboseTo add the local user or the AD user to the remote computer, use Invoke-Command.
Invoke-Command -ComputerName Computer1, Computer2 -ScriptBlock{ Add-LocalGroupMember -Group Administrators -Member TestUser1, TestUser2 }
Chirag Nagrekar Updated on: 2023-11-04T01:25:40+05:30 44K+ Views
Kickstart Your Career
Get certified by completing the course
Get StartedTag » Add Computer To Local Administrator Group Powershell
-
Add-LocalGroupMember (Microsoft.PowerShell.LocalAccounts)
-
Powershell Script To Add A User To A Local Admin Group
-
How To Add A Computer To A Local Group : R/PowerShell - Reddit
-
How To Add Local And Microsoft Accounts To Administrators Group ...
-
Add A User To The Local Administrators Group On A Remote Computer
-
How To Add Users To Administrators Group Using Windows ...
-
Adding Computer Object To Local Built-in Administrators Group For Win ...
-
How To Get Local Administrators With Or Without PowerShell - Netwrix
-
Adding A User To The Local Administrator Group Using Powershell
-
How To Manage Local Users And Groups Using PowerShell
-
Add-LocalGroupMember - PowerShell Command - PDQ
-
Adding Domain Users To The Local Administrators Group In Windows
-
Add A User To The Local Administrators Group In Windows Server 2012
-
Add Service User To Local Administrators Group Via Group Policy