bsharath
asked on
Need to add a username to a remote machines Terminal and remote desktop.
Hi,
Need to add a username to a remote machines Terminal and remote desktop.
REgards
Sharath
Need to add a username to a remote machines Terminal and remote desktop.
REgards
Sharath
can you explain more what you want to do....thanks....
ASKER
In the Gpedit > Computer Configuration > Windows Settings > Local Policy > User Rights >
You have many options so in there > Allow log on through Terminal Services and Allow log on locally inside these 2 security settings if i need to add a user remotely.Is there a way...
You have many options so in there > Allow log on through Terminal Services and Allow log on locally inside these 2 security settings if i need to add a user remotely.Is there a way...
ASKER
Any help....
it is better to use it using group policy in domain. you can access the GP setting from same path and apply this GPO.
ASKER
I am using the script like this...
strComputer = "dev-chen-mrd100"
Set objGroup = GetObject("WinNT://" & strComputer & "/Allow log on locally")
Set objUser = GetObject("WinNT://" & strComputer & "development/enoch")
objGroup.Add(objUser.ADsPa th)
But get this error.
-------------------------- -
Windows Script Host
-------------------------- -
Script: C:\Add user to terminal services.vbs
Line: 2
Char: 1
Error: The group name could not be found.
Code: 800708AC
Source: (null)
-------------------------- -
OK
-------------------------- -
strComputer = "dev-chen-mrd100"
Set objGroup = GetObject("WinNT://" & strComputer & "/Allow log on locally")
Set objUser = GetObject("WinNT://" & strComputer & "development/enoch")
objGroup.Add(objUser.ADsPa
But get this error.
--------------------------
Windows Script Host
--------------------------
Script: C:\Add user to terminal services.vbs
Line: 2
Char: 1
Error: The group name could not be found.
Code: 800708AC
Source: (null)
--------------------------
OK
--------------------------
is the "Allow log on locally" group exist on "dev-chen-mrd100"
you should use
strComputer = "dev-chen-mrd100"
Set objGroup = GetObject("WinNT://" & strComputer & "/Remote Desktop Users")
Set objUser = GetObject("WinNT://domainn ame/userna me")
objGroup.Add(objUser.ADsPa th)
chaneg domainname and username as per requirement
you should use
strComputer = "dev-chen-mrd100"
Set objGroup = GetObject("WinNT://" & strComputer & "/Remote Desktop Users")
Set objUser = GetObject("WinNT://domainn
objGroup.Add(objUser.ADsPa
chaneg domainname and username as per requirement
ASKER
mailtosinghs
I think i got you wrong.As i mentioned i need to add users to the below mentioned path remotely.
In the Gpedit > Computer Configuration > Windows Settings > Local Policy > User Rights >
You have many options so in there > Allow log on through Terminal Services and Allow log on locally inside these 2 security settings if i need to add a user remotely.Is there a way...
I think i got you wrong.As i mentioned i need to add users to the below mentioned path remotely.
In the Gpedit > Computer Configuration > Windows Settings > Local Policy > User Rights >
You have many options so in there > Allow log on through Terminal Services and Allow log on locally inside these 2 security settings if i need to add a user remotely.Is there a way...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://support.microsoft.com/kb/315276