Announcement

Collapse
No announcement yet.

WHS: Domain user to make local admin

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • WHS: Domain user to make local admin

    Some "Domain Users" in my company requires administrative privileges when they logon to ANY workstation.
    To add these users to the "Administrators" group of the target workstation, i found the following script and add it to user logon script. When the script executed, it had no effect but when i executed this script from local administrators account, it worked.




    Dim LocalComputer, UserName, DomainName

    LocalComputer = "Workstation1001"
    DomainName = "RedSpot"
    UserName = "James"

    set group = GetObject("WinNT://" & LocalComputer & "/Administrators, group")
    group.Add("WinNT://" & DomainName & "/" & UserName)





    Lets forget the script for a while. The key point is
    No "Domain User" can add himself to the local "Administrators" group.

    Is there any way, this script is executed by local Administrator but the logged on account should be normal Domain User account.

  • #2
    Re: WHS: Domain user to make local admin

    Hi,

    Modify and save the following line as a batch file and then assign as a startup script via GPO (In the computer section)

    Code:
    net localgroup Administrators "Domain\Security_Group" /Add
    Or alternatively look into the Restricted groups GPO setting: http://www.windowsecurity.com/articl...ed-Groups.html
    Caesar's cipher - 3

    ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

    SFX JNRS FC U6 MNGR

    Comment

    Working...
    X