Automatically add login domain user to powerusers Group

Source: Internet
Author: User

1, take into account the XP system computer, so the content uses Bat script, did not use PowerShell

2, need to use tool Lsrunas.exe



In the boot script, add:

REM copies Lsrunas to client C-disk system directory Xcopy "\share\lsrunas\lsrunas.exe" "C:\window


Also, in the logon script, add:

REM adds users to the Power Users group script echo @echo off >d:\addpowerusers.batecho net localgroup "Power Users" domain\%username%/add & Gt;>d:\addpowerusers.batrem calls Lsrunas to execute Addpowerusers.bat script C:\windows\lsrunas.exe/user:administrator/password : [Email protected]/domain:/command: "D:\AddPowerUsers.bat"/runpath:c:rem remove Addpowerusers.bat script Delete d:\ Addpowerusers.bat



If it is WS2012, remember to update the policy.

This article is from the "AICCDD" blog, make sure to keep this source http://520ccdd.blog.51cto.com/3926314/1704241

Automatically add login domain user to powerusers Group

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.