Use tip 5609 » How do I assign scripts in Windows to assign a startup script to each PC in the domain.
To make every user that logs onto the domain a local administrator of the PC they logged on from, the start script should contain:
@echo off setlocal set OK=N for /f "Tokens=*" %%a in ('%SystemRoot%\system32\net.exe LOCALGROUP "Administrators" ^|%SystemRoot%\system32\find.exe /i "NT Authority\Interactive"') do ( set OK=Y ) If "%OK%" EQU "N" %SystemRoot%\system32\net.exe LOCALGROUP "Administrators" "NT Authority\Interactive" /ADD endlocal
0 comments
Hide comments