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
LVL 11
bsharathAsked:
Who is Participating?
 
mailtosinghsConnect With a Mentor Commented:
if you have admin permission on domain, best way is to use domain policy.

if you have admin permission to the system do following

1, in the run type mmc
2, from file menu add/remove snapin
3, add group policy object editor snapin
4, click browse and on computers tab browse or type computer name/ip
5, click finish
6, you should be able to see the settings from there.
0
 
speshalystCommented:
0
 
DenisCooperCommented:
can you explain more what you want to do....thanks....
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
bsharathAuthor Commented:
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...
0
 
bsharathAuthor Commented:
Any help....
0
 
mailtosinghsCommented:
it is better to use it using group policy in domain. you can access the GP setting from same path and apply this GPO.
0
 
bsharathAuthor Commented:
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.ADsPath)


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  
---------------------------
0
 
mailtosinghsCommented:
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://domainname/username")
objGroup.Add(objUser.ADsPath)

chaneg domainname and username as per requirement
0
 
bsharathAuthor Commented:
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...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.