Jump to content

Recommended Posts

Posted

HI there,

 

Been a while since I've logged in but I'm having a issue so any advice would be appreciated.

 

We are going to be re imaging our IT suites, our network back bone is currently slow (1GB backbone with 10GB between servers), so as soon as we set 3 or more machines re imaging it drags the full network down and the only time the system doesn't get used is when we are closed over christmas.

 

I have successfully manage to make a USB Pen that will load my image and run an unattended file apart from it kicks an error for the "%machinename%" and it doesn't join the network.

 

1: Machine name issue

 

My temp solution behind this is to removed the "%machinename%" from the XML and it gives it a generic name instead, My assumption for is this is because it not going via WDS so it is unable to get its name linked to to its GUID? is there any way round this.

 

Can I boot WinPE via WDS and then point it to install an image from USB using the XML file instead of the WDS?

 

2. unattended domain join.

 

My guess work with this is that windows isn't coming up with the black setup screen after completing installtion so isn't running certain parts of the unattend file.

 

If i am able to boot to WDS & then load image from USB, where do i put the Unattend, will this have to be injected into the install.WIM instead?

 

 

Given we have 7 IT suites with 25 machines in we are wanting to try make it fully automated.

 

 

I hope all of this makes sense in what im trying to do.

 

Thanks in advance

Chris

Posted

The name linking is done by having the computer account's 'netbootguid' property populated with the GUID of the machine. As long as that property is filled and the answer file has %MACHINENAME% specified for its account name it should assume its former name.

 

 

Use this Power Shell script to provision the accounts before imaging (you'll need to delete the old accounts first if the name conflicts). The script uses a CSV that needs to contain the computer name and MAC for each machine. I dug around in the DHCP logs to get this information when I did it. Took a little cleaning up in Excel.

 

As long as each individual computer account persists in AD you'll only have to do this once.

 

Hope this helps...

 

 

(Not my script. Found it somewhere on the Internet once upon a time.)

   # V3.0
   # Changes:
   #    No longer relies on Quest AD Snap in
   #    No longer uses the kludgey Test-XADObject to validate the existence of computers in AD
    
   import-module activedirectory
    
   import-csv "c:\machines.csv" | foreach-object{ #imports CSV containing Name and MAC headings
    
       $name = $_.Name
       $MAC = $_.Mac  
      
       $CheckExists = get-adobject -Filter {(ObjectClass -eq "computer") -and (Name -eq $name)}  #Will be $NULL if this is a new computer
      
          
       if ($CheckExists -eq $NULL){
           [guid]$nbGUID = "00000000-0000-0000-0000-$MAC"  #casts 0s + MAC into a GUID, which is required for the netbootGUID property
           new-adcomputer -Name $name -SamAccountName $name -OtherAttributes @{'netbootGUID'=$nbGUID}        
           write-host $name " - " $nbGUID
         }
         else {
           write-host "$name already exists."
           }
          
   }

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...