Friday, November 10, 2017

Windows 10 - Feature Upgrade without the built in AppxPackages

Software Updates - Feature Upgrade - Windows 10

Software updates within an Enterprise organisation has been fairly straight forward until you attempt to use it for Feature Upgrades of Windows 10.  SCCM is very reliable at delivering the updates (Rollups, Updates, Upgrades) and as i have previously proved is UWF aware in Windows 10.
However, the Feature Upgrade does require a bit of prep work if you do not want the new Appx Applications installed as part of the Upgrade.


Moving between the 1507-1703 branches each Feature upgrade would reinstall the Appx Applications that you previously removed. Microsoft has addressed this in the 1703 - 1709 feature upgrade and if you removed an application it will not come back.  However, if the new branch has a new application this will get installed.

Uninstalled in-box apps no longer automatically reinstall
Starting with Windows 10, version 1703, in-box apps that were uninstalled by the user won't automatically reinstall as part of the feature update installation process.
Additionally, apps de-provisioned by admins on Windows 10, version 1703 machines will stay de-provisioned after future feature update installations. This will not apply to the update from Windows 10, version 1607 (or earlier) to version 1703.
https://docs.microsoft.com/en-gb/windows/whats-new/whats-new-windows-10-version-1703

 By using the SetupConfig.ini file for an OOBE after the Feature upgrade, you will be able to remove the provisioned appx applications before the user logs in.

Location of the SetupConfig.ini
Before the Feature Upgrade is deployed/installed via Software Center the SetupConfig.ini must be created and place locally on the system. Place the SetupConfig.ini file in the WSUS directory below; the WSUS folder does not exist by default. The Feature upgrade via SCCM will look in the WSUS folder and read the SetupConfig.ini

%systemdrive%\Users\Default\AppData\Local\Microsoft\Windows\WSUS\SetupConfig.ini


Content of the SetupConfig.ini
In the ini file i have detailed a script called "SetupComplete.cmd" that will be copied from this UNC share to the local computer; it is run at the very end of the Feature Upgrade.

[CommandLines]
/PostOOBE \\DomainName\NETLOGON\SOE\Scripts\RemoveAppx\setupcomplete.cmd


Once the SetupConfig.ini file has been processed it will then copy the referenced SetupComplete.cmd file and paste to the hidden folder  on the root drive c:\$WINDOWS.~BT\Sources\Scripts\SetupComplete.cmd 

Within the Setupact.log you will see the /PostOOBE switch detailed with the contents of the SetupConfig.ini file appended to the Feature Upgrade Command Line used to run the Software update.

SCCM Software Update / Feature Upgrade Command Line 

[/PreDownload /Update /Quiet  /progressCLSID 71212340-ea4e-4e40-a0ee-a26312345baf /ReportId {A81239C5-8127-4352-1234-6CE01234531F}.200 "/ClientId" "fed1234-612d-40dd-123a-cd1234ee12d" "/CorrelationVector" "/oCGdL3nj012344.7.2"   /PostOOBE \\DomainName\NETLOGON\SOE\Scripts\RemoveAppx\setupcomplete.cmd]



Content of the SetupComplete.cmd
This command file calls a "RemoveApps.ps1" PowerShell script created by Michael Niehaus 

powershell.exe -executionpolicy bypass -file \\DomainName\NETLOGON\SOE\Scripts\RemoveAppx\RemoveApps.ps1

This RemoveApps.ps1 script looks for an RemoveApps.xml file for appx applications to remove.

Contents of the RemoveApps.xml

Microsoft.BingWeather
Microsoft.DesktopAppInstaller
Microsoft.GetHelp
Microsoft.Getstarted
Microsoft.Messaging
Microsoft.Microsoft3DViewer
Microsoft.MicrosoftOfficeHub
Microsoft.MicrosoftSolitaireCollection
Microsoft.MicrosoftStickyNotes
Microsoft.Office.OneNote
Microsoft.OneConnect
Microsoft.People
Microsoft.Print3D
Microsoft.SkypeApp
Microsoft.Wallet
microsoft.windowscommunicationsapps
Microsoft.WindowsFeedbackHub
Microsoft.WindowsMaps
Microsoft.Xbox.TCUI
Microsoft.XboxApp
Microsoft.XboxGameOverlay
Microsoft.XboxIdentityProvider
Microsoft.XboxSpeechToTextOverlay
Microsoft.ZuneMusic
Microsoft.ZuneVideo
Microsoft.3DBuilder


No comments:

Post a Comment