The below unattend.xml file is an example from a Windows 10 Scripted Installation. It has been created using the Scripted Installation Wizard in the K2000 web interface. Later the Windows System Image Manager (WSIM) from the Assessment and Deployment Kit (ADK) has been used to extend the unattend.xml. At the same time WSIM validates the unattend.xml.
NOTE: We recommend in every case to validate your unattend.xml file using WSIM.
The below sample unattend.xml creates three drives (C, E, and G) using a primary and one extended partition. The extended partition holds two logical partitions.
=== START ===
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<UseConfigurationSet>true</UseConfigurationSet>
<UserData>
<AcceptEula>true</AcceptEula>
<FullName>###REGISTRATION_FULL_NAME</FullName>
<Organization>###REGISTRATION_ORGANIZATION</Organization>
<ProductKey>
<Key>###WINDOWS_PRODUCT_KEY</Key>
<WillShowUI>OnError</WillShowUI>
</ProductKey>
</UserData>
<ImageInstall>
<OSImage>
<InstallToAvailablePartition>true</InstallToAvailablePartition>
</OSImage>
</ImageInstall>
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Extend>false</Extend>
<Type>Primary</Type>
<Order>1</Order>
<Size>15000</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>Extended</Type>
<Extend>true</Extend>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>3</Order>
<Type>Logical</Type>
<Size>1000</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>4</Order>
<Type>Logical</Type>
<Size>1000</Size>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="modify">
<Active>true</Active>
<Format>NTFS</Format>
<Label>System</Label>
<Letter>C</Letter>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action="modify">
<Format>NTFS</Format>
<Label>Databases</Label>
<Letter>G</Letter>
<Order>2</Order>
<PartitionID>2</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action="modify">
<Order>3</Order>
<Letter>E</Letter>
<Label>UserData</Label>
<Format>NTFS</Format>
<Extend>true</Extend>
<PartitionID>3</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
</component>
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<UILanguage>en-GB</UILanguage>
<SetupUILanguage>
<UILanguage>en-GB</UILanguage>
</SetupUILanguage>
<InputLocale>en-ie</InputLocale>
<SystemLocale>en-ie</SystemLocale>
<UserLocale>en-ie</UserLocale>
</component>
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<DriverPaths>
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
<Path>Y:\drivers\windows_10_x64</Path>
</PathAndCredentials>
</DriverPaths>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RegisteredOwner>Rootdom Admin</RegisteredOwner>
<RegisteredOrganization>Rootdom Lab</RegisteredOrganization>
<ProductKey>###WINDOWS_PRODUCT_KEY</ProductKey>
<TimeZone>GMT Standard Time</TimeZone>
<AutoLogon>
<Enabled>true</Enabled>
<Username>###LOCAL_ADMIN_USER</Username>
<Password>
<PlainText>true</PlainText>
<Value>###LOCAL_ADMIN_PASSWORD</Value>
</Password>
<LogonCount>2</LogonCount>
</AutoLogon>
<ComputerName>*</ComputerName>
</component>
<component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<Identification>
<JoinWorkgroup>WORKGROUP</JoinWorkgroup>
</Identification>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Path>reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 00000000 /f</Path>
<Description>Setting Network Location</Description>
<Order>1</Order>
<WillReboot>OnRequest</WillReboot>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<SkipMachineOOBE>false</SkipMachineOOBE>
<SkipUserOOBE>false</SkipUserOOBE>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Name>###LOCAL_ADMIN_USER</Name>
<Group>Administrators</Group>
<Password>
<Value>###LOCAL_ADMIN_PASSWORD</Value>
<PlainText>true</PlainText>
</Password>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d explorer.exe,explorer.exe /f</CommandLine>
<Description>Show Desktop</Description>
<Order>1</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%systemdrive%\KACE\engine\kaceengine.exe</CommandLine>
<Description>KACE Engine</Description>
<Order>2</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
</FirstLogonCommands>
</component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<InputLocale>en-ie</InputLocale>
<SystemLocale>en-ie</SystemLocale>
<UILanguage>en-ie</UILanguage>
<UserLocale>en-ie</UserLocale>
</component>
</settings>
<cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="wim:c:/users/rskotnik/downloads/en-gb_windows_10_n_multiple_editions_version_1511_x64_dvd_7223843/sources/install.wim#Windows 10 Pro N Technical Preview"/>
</unattend>
=== END ===
Eventually, feel free to adjust the <DiskConfigration> section as required. If you would like to read further about the CreatePartition section or the DiskConfiguration section inside the unattend.xml, please refer to the below links. More resources can be found online.
CreatePartition (TechNet)
https://technet.microsoft.com/en-us/library/cc709648(v=ws.10).aspx