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