WSH: Domain user to be the local admin

September 25, 2009 at 01:05:35
Specs: Windows Server 2003, 3.0 ghz / 1 megs

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.


See More: WSH: Domain user to be the local admin

Report •


#1
September 25, 2009 at 07:04:31
Why do they "require" admin privileges?

LIR


Report •

#2
September 25, 2009 at 07:23:29
Lets forget the script for a while. The key point is No "Domain User" can add himself to the local "Administrators" group.
For obvious reasons, yes.

Is there any way, this script is executed by local Administrator but the logged on account should be normal Domain User account.
Make an AD group, and add your users to it. Then push a startup script to add that group to the local Administrators.


Report •

#3
September 27, 2009 at 20:32:54
Why do they "require" admin privileges?
These guys are system administrators in our company


Make an AD group, and add your users to it.
I'm already using this approach.

Then push a startup script to add that group to the local Administrators.
Couldn't understand. Please elaborate this procedure.


Report •

Related Solutions

#4
September 28, 2009 at 05:50:49

Report •


Ask Question