Create(???organizationalUnit???, ???ou=$Service_Account_OU???)
$objOU.SetInfo()
$objOU = [ADSI]???LDAP://$DC3/ou=$Service_Account_OU,dc=$DC1,dc=$DC2???
$objUser = $objOU.Create(???user???, ???cn=$User???)
$objUser.Put(???sAMAccountName???, ???$User???)
$objUser.SetInfo()
$objUser.SetPassword(???$Password???)
$objUser.SetInfo()
$objUser.Put(???UserAccountControl???, ???66048???)
$objUser.SetInfo()
Using PowerShell, the script connects to the LDAP service on the domain controller via ADSI and creates
a variable ($objDomain) for the domain name. $DC1 is the domain name. $DC2 is the domain suffix.
$DC3 is the complete name of the domain taken from $DC1 and $DC2 where the user will be created.
Next the script creates a new variable for the OU ($objOU) , creates the new OU called SVC_Accounts ,
and then sets the info.
Setting the OU creates the new object in Active Directory.
From there the script creates a new variable ($objUser) , takes the existing variable of the OU
($objOU) , and creates a user named svc-mb002 , taken from the ($User) variable, in the new OU.
The $objUser.SetInfo() creates the object in AD.
The next step sets the user ??™ s password with the $objUser.SetPassword . The password is set from the
($Password) variable. This password is used later in the cluster installation.
Pages:
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518