Powershell: Script to add domain computers, groups or user accounts to the local administrator group

posted in: Blog, Powershell | 3

Here is a simple Powershell script that I created, if you need to add domain computer accounts, users or groups to the local administrator group.
The script should be run locally on the computer on which you want the accounts to be added to the local administrator group.

Download: add_to_local_administrator.zip

3 Responses

  1. Michael

    Something wrong…
    You get $computername , which is not used but use $computer which is never defined

  2. joey bagodonuts

    one of the things that irritates me to no end when i look at scripts online is the lack of documentation in them.
    for folks that are trying to learn it is nice to know what each function or call is doing within the script.
    It’s also nice when you enclose the usage information within the script documentation, ie what version of Ps you are writing to, etc. that way people hunting for code snippets dont have to read 3/4 of the way down the page only t9o find that this is applicable to windows server 2012 that runs powershell 3.0 or higher..

Leave a Reply