none
Autounattend.xml not working?

    Question

  • Hi, all just want some help on why the Autounattend.xml file that I have attached is not working.

    It is designed to simply generate a random computer name and join the computer to the relevant 2008-R2 active directory domain specified during the OOBE setup process.

    I have placed it in the root of OS drive (Aka C:\) and specified it as follows:

    sysprep.exe /oobe /shutdown /quiet /unattend:C:\Autounattend.xml

    When I start the computer back up, it is neither on the domain nor is the computer name changed and randomnized. The domain user account specified in the Autounattend.xml has permissions to create and delete computer objects.

    What is wrong with what I am doing?

    Regards: Elliott.

    Autounattend.xml

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
       <settings pass="oobeSystem">
           <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <InputLocale>en-GB</InputLocale>
                <SystemLocale>en-GB</SystemLocale>
                <UILanguage>en-GB</UILanguage>
                <UserLocale>en-GB</UserLocale>
           </component>
    		
    	   <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
               <OOBE>
    				<HideEULAPage>true</HideEULAPage>
                    <NetworkLocation>Work</NetworkLocation>
                    <ProtectYourPC>2</ProtectYourPC>
                    <SkipMachineOOBE>true</SkipMachineOOBE>
                    <SkipUserOOBE>true</SkipUserOOBE>
    		   </OOBE>
    	  </component>
       </settings>
    	
      <settings pass="specialize">
    	 <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
               
    			<ComputerName>*</ComputerName>
    			<RegisteredOwner>Company-Name</RegisteredOwner>
    			<RegisteredOrganization>Company-name</RegisteredOrganization>
    	 </component>
            
    	 <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <Identification>
    			<UnsecureJoin>false</UnsecureJoin>
                    <Credentials>
    				 <Domain>InternalCompanyDomain.com</Domain>
    				 <Password>PASSWORD</Password>
                     <Username>USERAME</Username>
                    </Credentials>
    				<JoinDomain>InternalCompanyDomain.com</JoinDomain>
                </Identification>
          </component>
          
        </settings>
        <settings pass="generalize">
            <component name="Microsoft-Windows-PnpSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
            </component>
            
        </settings>
        <cpi:offlineImage cpi:source="wim:d:/install.wim#Windows 7 Professional" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    

    This documentation is archived and is not being maintained.

    Sysprep Command-Line Syntax

    This topic describes the command line syntax for the Windows Vista version of Sysprep.

    If you intend to transfer a Windows image to a different computer, you must run sysprep /generalize, even if the computer has the same hardware configuration. The sysprep /generalize command removes unique information from your Windows installation, which enables you to reuse that image on different computers. The next time you boot the Windows image, the specialize configuration pass runs. During this configuration pass, many components have actions that must be processed when you boot a Windows image on a new computer. Any method of moving a Windows image to a new computer, either through imaging, hard disk duplication, or other method, must be prepared with the sysprep /generalize command. Moving or copying a Windows image to a different computer without running sysprep /generalize is not supported.

    Sysprep Command-Line Options

    The following command-line options are available for Sysprep:

    sysprep.exe

    This documentation is archived and is not being maintained.

    Sysprep Command-Line Syntax

    This topic describes the command line syntax for the Windows Vista version of Sysprep.

    If you intend to transfer a Windows image to a different computer, you must run sysprep /generalize, even if the computer has the same hardware configuration. The sysprep /generalize command removes unique information from your Windows installation, which enables you to reuse that image on different computers. The next time you boot the Windows image, the specialize configuration pass runs. During this configuration pass, many components have actions that must be processed when you boot a Windows image on a new computer. Any method of moving a Windows image to a new computer, either through imaging, hard disk duplication, or other method, must be prepared with the sysprep /generalize command. Moving or copying a Windows image to a different computer without running sysprep /generalize is not supported.

    Sysprep Command-Line Options

    The following command-line options are available for Sysprep:

    sysprep.exe

    This documentation is archived and is not being maintained.

    Sysprep Command-Line Syntax

    This topic describes the command line syntax for the Windows Vista version of Sysprep.

    If you intend to transfer a Windows image to a different computer, you must run sysprep /generalize, even if the computer has the same hardware configuration. The sysprep /generalize command removes unique information from your Windows installation, which enables you to reuse that image on different computers. The next time you boot the Windows image, the specialize configuration pass runs. During this configuration pass, many components have actions that must be processed when you boot a Windows image on a new computer. Any method of moving a Windows image to a new computer, either through imaging, hard disk duplication, or other method, must be prepared with the sysprep /generalize command. Moving or copying a Windows image to a different computer without running sysprep /generalize is not supported.

    Sysprep Command-Line Options

    The following command-line options are available for Sysprep:

    sysprep.exe

    Tuesday, November 14, 2017 11:02 AM

All replies

  • Hi,

    In order to troubleshoot the problem, we need to do more research. Please upload the C:\Windows\System32\Sysprep\Panther folder to OneDrive and share link here.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, November 15, 2017 10:21 AM
  • Hi, 

    How’s everything going? Please feel free to give me any update.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, November 17, 2017 8:06 AM
  • Hi, 

    Just checking in to see if the information was helpful. Please let us know if you would like further assistance. 


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, November 20, 2017 9:54 AM
  • Sorry for the late reply, been busy with work and have not had time to reply.

    I have zipped and uploaded my Sysprep folder from C:\Windows\System32 to OneDrive and can be viewed on the link below.

    https://1drv.ms/u/s!ArNTgSwdkr_Ed61YpcxF7Sh3dQE

    Regards: Elliott.


    Monday, November 20, 2017 11:56 AM
  • Hi,
    The date of sysprep log files is 2017/08/08. Is there something wrong?

    Please try to run that command again to see if there is created new date in sysprep log files (C:\Windows\System32\Sysprep\Panther\setupact.txt).
    If the new sysprep log files is created, please upload it and share link here.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Tuesday, November 21, 2017 4:53 AM
  • No, the last time I ran Sysprep or did anything to the PC in question was in August.

    It is a Disaster Recovery PC at my work place, what has to be imaged using Sysmantic Ghost and then sent to the DR Office Facility that is connected to our corporate domain.

    When the computers have our DR image pushed out to them and then start what are of all the same model/spec, they need to join our AD domain and set a random computer name automatically. 

    Thus I need help getting the PC in question to join our domain and set a random computer name when it first starts up after being syspreped.

    Regards: Elliott.


    Tuesday, December 5, 2017 8:48 PM
  • Hi,

    Did the PC had joined domain before you ran Sysprep? Because in the setupact.log, it shows “This machine is joined to a domain”.

    Please use other PC which is unjoined domain to test if the Autounattend.xml file could work well.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, December 6, 2017 8:43 AM
  • Today I tried removing the DR PC from the domain, rebooting it and then syspreping it again. Still not working as is not joined to the domain when it reboots and still has the previous non-randomized computer name.

    Need to get it working sooner than later, as will be testing pushing out the image at the DR facility later in the year and will need each computer of the same hardware spec joined to our domain.

    My latest Panther logs: https://1drv.ms/u/s!ArNTgSwdkr_EeH3xsuulwdiFWLE

    I noticed this in the setupact.log as well:

    Line 46 to 64:
    
    2018-02-05 14:27:36, Info                         [shsetup] Sysprep_Cleanup_Shell entered
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\OOBE' + 'SkipMachineOOBE' returned 0
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\OOBE' + 'SkipUserOOBE' returned 0
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\OOBE' + 'HideEULAPage' returned 0
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\OOBE' + 'NetworkLocation' returned 0
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\OOBE' + 'ProtectYourPC' returned 0
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\Setup\OOBE' + 'MediaBootInstall' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\Setup\OOBE' + 'SetupDisplayedProductKey' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\Setup\OOBE' + 'SetupDisplayedEula' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\Setup\OOBE' + 'SetupDisplayedLanguageSelection' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\Setup\OOBE' + 'SetupSQMOptIn' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\Setup\OOBE' + 'UnattendCreatedUser' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\Setup\OOBE' + 'UnattendSetTimeZone' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows\CurrentVersion\Setup\OOBE' + 'UnattendSetAutologon' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows NT\CurrentVersion\WinLogon' + 'AutoAdminLogon' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows NT\CurrentVersion\WinLogon' + 'DefaultUserName' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'Software\Microsoft\Windows NT\CurrentVersion\WinLogon' + 'DefaultDomainName' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteKey on 'SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork' returned 2
    2018-02-05 14:27:36, Info                         [shsetup] SHDeleteValue on 'System\CurrentControlSet\Control\Network\NetworkLocationWizard' + 'HideWizard' returned 2
    
    
    Line: 140 & 141:
    
    2018-02-05 14:27:55, Info       [0x0f0008] SYSPRP spnet.dll::IsDomainMember:This machine is not joined to a domain
    2018-02-05 14:27:55, Info       [0x0f000e] SYSPRP spnet.dll::UnjoinNetworkDomain:Not a domain member, nothing to do


    Does the "Microsoft-Windows-UnattendedJoin" component in the xml file get processed and taken into account when Sysprep is ran from within Windows using the following command: sysprep.exe /oobe /shutdown /quiet /unattend:C:\Autounattend.xml

    Regards: Elliott.

    Monday, February 5, 2018 7:39 PM
  • Sorted my issue out after months of trouble.

    The following article below was the solution to my problem, once I had converted Windows 7 from a BIOS (MBR) to a UEFI (GPT) installation, sysprep with the "generalize" option worked and the computer rebooted successfully and joined the domain.

    https://social.technet.microsoft.com/wiki/contents/articles/14286.converting-windows-bios-installation-to-uefi.aspx

    Regards: Elliott.
    Friday, March 23, 2018 6:23 PM