Scenario:
MDT 2013 - Build reference image for Win 8.1 on hyper-v executing the following commands removing all metro apps.
Powershell.exe -Command "&{Get-appxPackage -AllUsers | Remove-AppxPackage -ErrorAction SilentlyContinue}"
Powershell.exe -Command "&{Get-AppXProvisionedPackage -online | Remove-AppxProvisionedPackage -online -ErrorAction SilentlyContinue}"
Install windows updates and perform sysprep and capture wim task
Import Wim into Sccm 2012 r2 and deploy with standard mdt task
Problem:
After deployment all Metro apps are reinstalled or reinstalling.
Notes: Setting Copyprofile True is ignored and have tried various methods and it is always ignored.
If I use the wim from sources\install.wim and I either dism /remove-appx... or powershell in win PE get-appx -path | Remove-appx...
If that wim is modified and used then it deploys without the Metro apps but it doesnt have any windows updates. If I use that wim to build the reference image it will have no metro apps but after capture and deploy through sccm the metro apps start to re-install.
Below is the unattend.xml
<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend"><settings pass="windowsPE"><component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"><Display><ColorDepth>16</ColorDepth><HorizontalResolution>1024</HorizontalResolution><RefreshRate>60</RefreshRate><VerticalResolution>768</VerticalResolution></Display><ComplianceCheck><DisplayReport>OnError</DisplayReport></ComplianceCheck><UserData><AcceptEula>true</AcceptEula><ProductKey><Key></Key></ProductKey></UserData></component><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>0409:00000409</InputLocale><SystemLocale>en-US</SystemLocale><UILanguage>en-US</UILanguage><UserLocale>en-US</UserLocale></component></settings><settings pass="generalize"><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"><DoNotCleanTaskBar>true</DoNotCleanTaskBar></component></settings><settings pass="specialize"><component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"><Identification><Credentials><Username></Username><Domain></Domain><Password></Password></Credentials><JoinDomain></JoinDomain><JoinWorkgroup></JoinWorkgroup><MachineObjectOU></MachineObjectOU></Identification></component><component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"><ComputerName></ComputerName><ProductKey></ProductKey><RegisteredOrganization></RegisteredOrganization><RegisteredOwner></RegisteredOwner><DoNotCleanTaskBar>true</DoNotCleanTaskBar><TimeZone>Pacific Standard Time</TimeZone><CopyProfile>true</CopyProfile></component><component name="Microsoft-Windows-IE-InternetExplorer" 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"><Home_Page>http://www.microsoft.com/</Home_Page><DisableWelcomePage>true</DisableWelcomePage><DisableFirstRunWizard>false</DisableFirstRunWizard></component><component name="Microsoft-Windows-Deployment" 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"><RunSynchronous><RunSynchronousCommand wcm:action="add"><Description>EnableAdmin</Description><Order>1</Order><Path>cmd /c net user Administrator /active:yes</Path></RunSynchronousCommand><RunSynchronousCommand wcm:action="add"><Description>UnfilterAdministratorToken</Description><Order>2</Order><Path>cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v FilterAdministratorToken /t REG_DWORD /d 0 /f</Path></RunSynchronousCommand><RunSynchronousCommand wcm:action="add"><Description>disable user account page</Description><Order>3</Order><Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f</Path></RunSynchronousCommand></RunSynchronous></component><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>0409:00000409</InputLocale><SystemLocale>en-US</SystemLocale><UILanguage>en-US</UILanguage><UserLocale>en-US</UserLocale></component><component name="Microsoft-Windows-TapiSetup" 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"><TapiConfigured>0</TapiConfigured><TapiUnattendLocation><AreaCode>""</AreaCode><CountryOrRegion>1</CountryOrRegion><LongDistanceAccess>9</LongDistanceAccess><OutsideAccess>9</OutsideAccess><PulseOrToneDialing>1</PulseOrToneDialing><DisableCallWaiting>""</DisableCallWaiting><InternationalCarrierCode>""</InternationalCarrierCode><LongDistanceCarrierCode>""</LongDistanceCarrierCode><Name>Default</Name></TapiUnattendLocation></component><component name="Microsoft-Windows-SystemRestore-Main" 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"><DisableSR>1</DisableSR></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"><UserAccounts><AdministratorPassword><Value>QQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA</Value><PlainText>false</PlainText></AdministratorPassword></UserAccounts><AutoLogon><Enabled>true</Enabled><Username>Administrator</Username><Domain>.</Domain><Password><Value>UABhAHMAcwB3AG8AcgBkAA==</Value><PlainText>false</PlainText></Password><LogonCount>999</LogonCount></AutoLogon><Display><ColorDepth>32</ColorDepth><HorizontalResolution>1024</HorizontalResolution><RefreshRate>60</RefreshRate><VerticalResolution>768</VerticalResolution></Display><FirstLogonCommands><SynchronousCommand wcm:action="add"><CommandLine>wscript.exe %SystemDrive%\LTIBootstrap.vbs</CommandLine><Description>Lite Touch new OS</Description><Order>1</Order></SynchronousCommand></FirstLogonCommands><OOBE><HideEULAPage>true</HideEULAPage><NetworkLocation>Work</NetworkLocation><ProtectYourPC>1</ProtectYourPC></OOBE><RegisteredOrganization></RegisteredOrganization><RegisteredOwner></RegisteredOwner><TimeZone></TimeZone></component><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>0409:00000409</InputLocale><SystemLocale>en-US</SystemLocale><UILanguage>en-US</UILanguage><UserLocale>en-US</UserLocale></component></settings><settings pass="offlineServicing"><component name="Microsoft-Windows-PnpCustomizationsNonWinPE" 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"><DriverPaths><PathAndCredentials wcm:keyValue="1" wcm:action="add"><Path>\Drivers</Path></PathAndCredentials></DriverPaths></component></settings><cpi:offlineImage cpi:source="catalog://sccm1/deploymentshare$/operating systems/windows 8.1 enterprise x64.1/sources/install_windows 8.1 enterprise.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /></unattend>