Sign in with
Sign up | Sign in
Your question
Solved

Adding domain user to admin group

Last response: in Windows 7
Share
January 16, 2013 5:10:44 PM

How can I add my domain user to administrators group when I am logged in with same domain user ID.

Best solution

a b $ Windows 7
January 16, 2013 5:18:18 PM

You can't. Talk to your corporate IT.
Share
a b $ Windows 7
January 16, 2013 5:23:44 PM

This will need to be done the domain controller, not your client machine.

If you have administrator access to your domain controller and know what O/S is running (it certainly wont be Windows 7), then we may be able to assist.
m
0
l
Related resources
January 16, 2013 5:47:36 PM

even on my home laptop, I was trying to add a local user to admin group using below script but getting an error : Access denied on line 12

Set oWshNet = CreateObject("WScript.Network" )
sUser = "Ginnu"
sNetBIOSDomain = oWshNet.UserDomain
sComputer = oWshNet.ComputerName
Set oGroup = GetObject("WinNT://" & sComputer & "/Administrators,group" )
Set oUser = GetObject("WinNT://" & sNetBIOSDomain & "/" & sUser & ",user" )
oGroup.Add(oUser.ADsPath)
m
0
l
a b $ Windows 7
January 16, 2013 5:50:17 PM

ursonly11 said:
even on my home laptop, I was trying to add a local user to admin group using below script but getting an error : Access denied on line 12

Set oWshNet = CreateObject("WScript.Network" )
sUser = "Ginnu"
sNetBIOSDomain = oWshNet.UserDomain
sComputer = oWshNet.ComputerName
Set oGroup = GetObject("WinNT://" & sComputer & "/Administrators,group" )
Set oUser = GetObject("WinNT://" & sNetBIOSDomain & "/" & sUser & ",user" )
oGroup.Add(oUser.ADsPath)

Which is correct behavior if the script is not running with administrator rights.
m
0
l
January 16, 2013 5:56:32 PM

ex_bubblehead said:
Which is correct behavior if the script is not running with administrator rights.


But I am talking about home laptop where I am logged in with Admin ID only
m
0
l
January 16, 2013 6:00:25 PM

Ok so this is funny !
My ID is a member of Admin group but I wasn't able to run script as mentioned above. But when I selected run as admin, function behaved properly without error.
How is this possible that my ID being a part of admin group does not have complete rights
m
0
l
a b $ Windows 7
January 16, 2013 6:01:24 PM

Did you run the script by right clicking and choosing "Run as administrator"? If not, the script is not running with administrator rights.
m
0
l
a b $ Windows 7
January 16, 2013 6:02:23 PM

ursonly11 said:
Ok so this is funny !
My ID is a member of Admin group but I wasn't able to run script as mentioned above. But when I selected run as admin, function behaved properly without error.
How is this possible that my ID being a part of admin group does not have complete rights

Welcome to Windows 7. That's how administrator level accounts have behaved since the release of Vista.
m
0
l
January 16, 2013 6:08:58 PM

Best answer selected by ursonly11.
m
0
l
!