Windows Server 2012 unattended upgrade

headlessunattendedupgradewindowswindows-server-2012

I am new to using windows server software and at the moment we are using windows server 2008 R2 datacenter. We want to upgrade to server 2012.

How can we perform a unattended upgrade on the windows server. we have no physical access to this server. I have found instructions on how to preform a unattended install (disk wiped non upgrade) but how can we upgrade?

Best Answer

Following the recommendation above, this is what I did.

  1. Installed a Demo version of Windows Server 2008R2 in a virtual machine.
  2. obtained the Demo version of windows server 2012R2
  3. followed up this article windows-server-2012-unattended (had to add a couple of tweaks to add the IP)

Used this site as a reference for the additional properties: windows-server-2012-automated-install-settings

And I can successfully upgrade Windows 2008R2 to 2012R2 automated from a RDP session.

In short the steps are:

  1. Search for the Windows ADK (Assessment and Deployment Kit) (adksetup.exe at least version 8.100.26866)
  2. When running the Install select Deployment Tools and Windows Preinstallation Environment (Windows PE).
  3. Once Installed open: Windows System Image Manager. (from the start menu)
  4. You will need to have access to The ISO and find the install.wim source file (usually inside of: [iso]\sources)
  5. When creating the image you will need to select the OS version to use.
  6. Once the image is ready, you will need to start adding the different settings to the configuration.
    Copy the configuration sample and name it Autounattend.xml update as needed (either with the tool or with notepad, recommended the tool) to execute the upgrade you will need: [windows source]\setup.exe /unattend:"\path\O.S\Autounattend.xml"

Configuration Sample

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <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>mysuperComputer</ComputerName>
            <ProductKey>123-1234-12345-12345-XXXX</ProductKey>
            <RegisteredOrganization>Somewhere</RegisteredOrganization>
            <RegisteredOwner>Me</RegisteredOwner>
            <TimeZone>Pacific Standard Time</TimeZone>
        </component>
        <component name="Microsoft-Windows-TerminalServices-LocalSessionManager" 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">
            <fDenyTSConnections>false</fDenyTSConnections>
        </component>
    </settings>
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-International-Core-WinPE" 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">
            <SetupUILanguage>
                <UILanguage>en-US</UILanguage>
            </SetupUILanguage>
            <InputLocale>en-US</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UserLocale>en-US</UserLocale>
        </component>
        <component name="Microsoft-Windows-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">
            <UserData>
                <ProductKey>
                    <Key>123-1234-12345-12345-XXXX</Key>
                    <WillShowUI>OnError</WillShowUI>
                </ProductKey>
                <AcceptEula>true</AcceptEula>
                <FullName>Me</FullName>
                <Organization>Me</Organization>
            </UserData>
            <ImageInstall>
                <OSImage>
                    <InstallFrom>
                        <MetaData wcm:action="add">
                            <Key> /IMAGE/NAME</Key>
                            <Value>Windows Server 2012 SERVERSTANDARD</Value>
                        </MetaData>
                        <Path>\\SOMESERVER\Windows Server\install.wim</Path>
                    </InstallFrom>
                    <InstallTo>
                        <DiskID>0</DiskID>
                        <PartitionID>1</PartitionID>
                    </InstallTo>
                </OSImage>
            </ImageInstall>
            <DiskConfiguration>
                <WillShowUI>OnError</WillShowUI>
                <Disk wcm:action="add">
                    <CreatePartitions>
                        <CreatePartition wcm:action="add">
                            <Order>1</Order>
                            <Size>1000</Size>
                            <Type>Primary</Type>
                        </CreatePartition>
                    </CreatePartitions>
                    <ModifyPartitions>
                        <ModifyPartition wcm:action="add">
                            <Active>true</Active>
                            <Extend>true</Extend>
                            <Format>NTFS</Format>
                            <Letter>C</Letter>
                            <Order>1</Order>
                            <PartitionID>1</PartitionID>
                        </ModifyPartition>
                    </ModifyPartitions>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                </Disk>
            </DiskConfiguration>
            <WindowsDeploymentServices>
                <Login>
                    <Credentials>
                        <Password>thisisasecret</Password>
                        <Username>Administrator</Username>
                    </Credentials>
                </Login>
            </WindowsDeploymentServices>
            <UpgradeData>
                <Upgrade>false</Upgrade>
            </UpgradeData>
        </component>
        <component name="Microsoft-Windows-TCPIP" 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">
            <Interfaces>
                <Interface wcm:action="add">
                    <Ipv4Settings>
                        <DhcpEnabled>true</DhcpEnabled>
                    </Ipv4Settings>
                    <Identifier>1</Identifier>
                </Interface>
            </Interfaces>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <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">
            <RegisteredOrganization>-</RegisteredOrganization>
            <RegisteredOwner>-</RegisteredOwner>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:c:/temp/install.wim#Windows Server 2012 R2 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>