Jump to content

Recommended Posts

Posted

I am trying to get an image onto our network. For testing I am deploying our system using MDT and sysprepping.

Then using unattend to get the computer onto the network manually entering a computer name.

The problem is that the computer is joining the domain and then the renaming is breaking the trust relationship with the domain controller. When I log on with a domain admin account I get the trust relationship between the computer and the domain message.

Is it possible to get a the Win 7 computer onto the domain after assigning the computername?

Is the best method to use a wildcard for a computername, so that it joins the domain, then rename and rejoin the domain with a script?

 


   
       
           en-GB
           en-GB
           en-US
           en-GB
           en-GB
       
       
           
               true
               Work
               1
           
           
               
                   
                       
                           *********************
                           false
                       
                       Local User
                       LOCAL administrator
                       administrators
                       adminstrator
                   
               
           
           GMT Standard Time
           Schoolname
           registeredowner
           false
       
   
   
       
           KMS KEY
           REGISTERED ORGANISATION
           REGISTERED OWNER
           false
           GMT Standard Time
       
       
           
               
                   domain.name
                   domainadmin
                   *****
               
               domain.name
           
       
       
           
               
                   cmd /c net user administrator /active:yes
                   1
               
           
       
   
   

Posted
in MDT i believe (if you have the full database installed) tag machine names to mac address for example so that machine always get the same name which means it would be renamed and it just named and added to the domain
Posted

After a war of attrition I am coming up with a solution here

I used unattend.xml to name the computer then I have manually tried this PS script:

$domain = "myDomain"

$password = "myPassword!" | ConvertTo-SecureString -asPlainText -Force

$username = "$domain\myUserAccount"

$credential = New-Object System.Management.Automation.PSCredential($username,$password)

Add-Computer -DomainName $domain -Credential $credential

Now it is just putting A+B together ....:)

Posted
Works a treat :) If you host the script in c:\windows\setups\scripts and use a script to invoke the powershell file. You will need to enable permissions to allow ps1 files to run in the unattend.xml RunAsynchronousCommand. :) :) :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...