Re: Adding Domain User to local PC
From: Richard C. (richardc_ca_at_hotmail.com)
Date: 11/27/04
- Next message: Roger Abell [MVP]: "Re: dns server"
- Previous message: Houghts16: "Re: Adding Domain User to local PC"
- In reply to: Houghts16: "Re: Adding Domain User to local PC"
- Next in thread: Houghts16: "Re: Adding Domain User to local PC"
- Reply: Houghts16: "Re: Adding Domain User to local PC"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 27 Nov 2004 04:15:58 -0500
If these computers are members of an Active Directory domain then use a
Group Policy to add you to the list of allowed users to connect using remote
desktop.
If your user is a member of Domain Admins and remote desktop is enabled on
the PC then you'll have access by default.
BTW, you can use a group policy to enable remote desktop too.
Richard...
"Houghts16" <Houghts16@discussions.microsoft.com> wrote in message
news:7CC0DB39-FD45-4DDC-9391-8C55DBE4CE24@microsoft.com...
> Sorry I did not word the question properly.
>
> I support many computers. When I have made changes to the computer I need
> to login remotely as a user in this domain to test my changes. I would
> like
> to be able to script this procedure.
>
>
> Right click on my computer
> select properties
> select remote tab
> In the remote Desktop box click the "allow users to connect remotely to
> this
> computer"
> Click on the select Remote User button
> Click Add
> Type in "Domain User"
> Click on the Locations button and select the Domain
> Click on the "object Type" button and select Groups.
>
> Hope this is clearer
>
> Thanks for your help
>
> Dave
>
> "Richard Mueller [MVP]" wrote:
>
>> Hi,
>>
>> I think you are correct. I believe the poster wants to add a domain user
>> to a local group. The procedure would be to bind to the domain user (or
>> group), bind to the local group on the PC, then use the Add method of the
>> local group object to add the member, passing the AdsPath of the domain
>> user (or group). I use the IsMember method of the group object to check
>> if the new member already belongs to the group before adding them. You
>> must use the WinNT provider. For example, I have used the script below.
>> However, sometimes it cannot bind to the remote computer. I'm not sure
>> when this can be done and when not. Perhaps Torgeir knows. Of course, you
>> need sufficient permissions (be a member of Domain Admins).
>>
>> Option Explicit
>> Dim strDomainGroup, strComputer, objLocalGroup, objDomainGroup
>>
>> ' Specify AdsPath of domain group to be added to
>> ' local group.
>> strDomainGroup = "WinNT://MyDomain/MyGroup,group"
>>
>> ' Bind to domain group.
>> Set objDomainGroup = GetObject(strDomainGroup)
>>
>> ' Retrieve or specify computer NetBIOS name.
>> strComputer = "RemoteComputer"
>>
>> ' Bind to local group.
>> Wscript.Echo "WinNT://" & strComputer _
>> & "/Administrators,group"
>>
>> Set objLocalGroup = GetObject("WinNT://" & strComputer _
>> & "/Administrators,group")
>>
>> ' Check if domain group already a member.
>> If Not objLocalGroup.IsMember(objDomainGroup.AdsPath) Then
>> ' Add domain group to local group.
>> objLocalGroup.Add(objDomainGroup.AdsPath)
>> Wscript.Echo "Not Member, add"
>> Else
>> Wscript.Echo "Already member"
>> End If
>>
>> --
>> Richard
>> Microsoft MVP Scripting and ADSI
>> HilltopLab web site - http://www.rlmueller.net
>> --
>> "Mark-Allen Perry" <mark-allen@mvps_dot_org> wrote in message
>> news:Oy9$3u$0EHA.2192@TK2MSFTNGP14.phx.gbl...
>> Hmmm... not sure I understand the question. Do you want to add a
>> domain user to a 'local group'?
>>
>> Or are you thinking it is necessary to add a 'domain user' to a local
>> computer SAM?
>>
>> There is no need to add a domain user to a local machine since the user
>> profile will either be transferred from the DC or will be created and
>> then transferred to the local PC. Although there might be a user profile
>> for the domain user on the local machine, their name *does not* reside in
>> the local SAM.
>>
>> Does this help? And Torgeir, correct me here if I'm off base.
>>
>> --
>>
>> Always try the MS KB first before posting.
>> MS KB: http://support.microsoft.com/default.aspx?scid=fh;EN-US;KBHOWTO
>> And the answer could have already been posted, so try searching this
>> and other newsgroups first.
>> ----
>> Mark-Allen Perry
>> ALPHA Systems
>> Marly, Switzerland
>> mark-allen_AT_mvps_DOT_org
>>
>> "Houghts16" <Houghts16@discussions.microsoft.com> wrote in message
>> news:F0B17698-F1A6-4C9F-BBE4-8105941D211A@microsoft.com...
>> Hi
>>
>> Can this be done. I want to add a Domain User to the local pc.
>> I want to do this thru a script.
>> All the computer names are in AD.
>> I have a script in place that I can manipulate to provide the
>> computer name
>> that I want this done to.
>>
>> Thanks Dave
- Next message: Roger Abell [MVP]: "Re: dns server"
- Previous message: Houghts16: "Re: Adding Domain User to local PC"
- In reply to: Houghts16: "Re: Adding Domain User to local PC"
- Next in thread: Houghts16: "Re: Adding Domain User to local PC"
- Reply: Houghts16: "Re: Adding Domain User to local PC"
- Messages sorted by: [ date ] [ thread ]