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.