User adding

Ananda Mahala 21 Reputation points
2021-04-22T14:50:23.167+00:00

How to add one user at multiple server on admin group through PowerShell

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,628 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 86,026 Reputation points
    2021-04-22T15:27:39.177+00:00

    Hi @Ananda Mahala ,

    Here's one example on how to accomplish this:

    Invoke-Command -ComputerName ServerX, ServerY -ScriptBlock {add-LocalGroupMember -Group "Administrators" -Member "YourUser" }  
    

    You'll find plenty of options with a quick search on your favourite search engine.

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Best regards,
    Leon


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.