Re: Join computer to a domain
From: Oli Restorick [MVP] (oli_at_mvps.org)
Date: 05/06/04
- Next message: Flo: "DNS and WMI"
- Previous message: Torgeir Bakken \(MVP\): "Re: IfMember.exe"
- In reply to: SA: "Join computer to a domain"
- Next in thread: SA: "Re: Join computer to a domain"
- Reply: SA: "Re: Join computer to a domain"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 May 2004 19:01:19 +0100
I'm not sure of the script or its effects, but definitely create a new
domain account specifically for domain joins. I would also create a group,
place this account in it and then use the delegation of control wizard to
delgate the right to create and delete computer accounts from the OUs and
containers you want the machines to end up in.
The "Add workstations to the domain" user right is really a legacy thing
and, while you can change the number of machines a regular user can add, I
think zero is a good setting for it.
Hope this helps
Oli
"SA" <nospam@nospam.nospam> wrote in message
news:e5syhR4MEHA.3380@TK2MSFTNGP11.phx.gbl...
> Hi all,
> I want to use this script I found at the script center to speed up the
> process of joing the domain and had a few questions about it:
>
> Should I create a special domain account for this script and where would I
> increase the count of machine added from the default of 10 for this
> machine.
> This script will be run as the local administrator of the machine.
>
> Const JOIN_DOMAIN = 1
> Const ACCT_CREATE = 2
> Const ACCT_DELETE = 4
> Const WIN9X_UPGRADE = 16
> Const DOMAIN_JOIN_IF_JOINED = 32
> Const JOIN_UNSECURE = 64
> Const MACHINE_PASSWORD_PASSED = 128
> Const DEFERRED_SPN_SET = 256
> Const INSTALL_INVOCATION = 262144
> strDomain = "FABRIKAM"
> strPassword = "ls4k5ywA"
> strUser = "shenalan"
> Set objNetwork = CreateObject("WScript.Network")
> strComputer = objNetwork.ComputerName
> Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\"
> &
> _
> strComputer & "\root\cimv2:Win32_ComputerSystem.Name='"
> &
> _
> strComputer & "'")
> ReturnValue = objComputer.JoinDomainOrWorkGroup(strDomain, _
> strPassword, _
> strDomain & "\" & strUser,
> _
> NULL, _
> JOIN_DOMAIN + ACCT_CREATE)
>
> Thanks.
> -SA.
>
>
- Next message: Flo: "DNS and WMI"
- Previous message: Torgeir Bakken \(MVP\): "Re: IfMember.exe"
- In reply to: SA: "Join computer to a domain"
- Next in thread: SA: "Re: Join computer to a domain"
- Reply: SA: "Re: Join computer to a domain"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|