Removing Windows 8.1 Modern Applications during your MDT / SCCM Task Sequence

Posted: March 12, 2014 in Configuration Manager 2012, MDT
Tags: , , , , , , , , , ,

I’ve implemented this solution based on information provided in the following blogs – credit to these people for posting this information.

http://www.deploymentresearch.com/Research/tabid/62/EntryId/97/PowerShell-wrapper-for-MDT-2012-Update-1-and-MDT-2013-Preview.aspx

http://blogs.technet.com/b/deploymentguys/archive/2013/10/21/removing-windows-8-1-built-in-applications.aspx

So I’ve moved on from my old process of corporate WIM image creation. I used to build up an image from a source ISO for a respective operating system using Hyper V, make my customisations, apply patches, then use MDT to do a sysprep and capture. I know, I know, there are probably numerous reasons why you shouldn’t do this. Well no more after watching Johan’s session from System Center Universe this year here 

The new process involves the more contemporary approach of doing a completely automated build and capture in one process with MDT performing any additional changes using scripts and additional steps. The session that Johan presented is in my view the best by far that I have seen.

One thing that wasn’t covered was how to remove the built in Windows 8.1 Modern Applications. In my case (like many others) we are deploying Windows 8.1 and do not wish to have all of these applications available.

Here is a solution you can implement which will remove these apps as part of your MDT or Configuration Manager Task Sequence. My example will be in MDT 2013.

Firstly create a new powershell script from the this blog, you can amend the script as required so that it only removes the applications that you want. Alternatively I have copied the script syntax into a word document here removemodernappsnew – please make sure that you edit this script in Powershell ISE to confirm that there are no syntax errors.

Copy the script to your MDT server sources folder.

Create a new MDT application and give it an appropriate name such as Remove Windows 8.1 Modern Applications

RemoveApps1

Use the following powershell wrapper command – credit to Johan who posted the install wrapper argument here

powershell.exe -Command “set-ExecutionPolicy Unrestricted -Force; cpi ‘%DEPLOYROOT%\Applications\Remove Windows 8.1 Modern Applications\RemoveWindows8Apps.ps1’ -destination c:\; c:\RemoveWindows8Apps.ps1; ri c:\*.ps1 -Force; set-ExecutionPolicy Restricted -Force”

Note you will need to adjust the path to your powershell script depending on how you setup the application in MDT.

RemoveApps3

Now just add an install application step in your existing MDT / Configuration Manager Task Sequence, its that easy.

RemoveApps2

If you implement a Suspend action in your MDT Task Sequence you can check that the apps have been removed.

RemoveApps4

RemoveApps5

Cheers

Damon

Advertisements
Comments
  1. […] Removing Windows 8.1 Modern Applications during your MDT / SCCM Task Sequence. […]

  2. mpapazov says:

    I receive MSG “security warning run only script that you can trust”. How can i remove it, i don`t want to click [R] during deployment.

    • Damon Johns says:

      Are you running the script with Config Manager? If so then you may need to:

      1. Add an additional step in your tasks sequence to set the powershell execution policy to unrestricted (Set-ExecutionPolicy Unrestricted)
      2. Execute the provided powershell script
      3. Add an additional step in your task sequence to set the powershell execution policy back to restricted (Set-ExecutionPolicy Restricted)

      I haven’t specifically tested the script with Config Manager although it should be possible to achieve what I have demonstrated with MDT.

      Cheers
      Damon

  3. When should I expect the script to kick off? I don’t see any indication that the script is copied to the receiving computer or even attempted to run (your screenshot seems to make me think right after the OS install has completed)

  4. Zacchaeus Day says:

    The windows apps are still installed even though I get a successful install result in the logs.

    Application Remove Windows 8.1 Modern Applications installed successfully ZTIApplications 4/2/2015 9:09:03 AM 0 (0x0000)

    • Damon Johns says:

      I’m on leave for Easter but I will take a look at the script again next week and post a response. My initial feeling is that the appx numbers have changed since i posted this, probably due to update 1 being released.

  5. Damon Johns says:

    Hi Zacchaeus,

    I have taken a look at the script again since its been a while since I posted this information. The script itself specifies the appx packages by name so the problem wont be what I suggested in my previous response. I have test run the script manually against a fresh install of Windows 8.1 and it seems to be having a problem with the ‘ at the end of each appx name – this section:

    $AppsList = “microsoft.windowscommunicationsapps”,”Microsoft.BingFinance”,”Microsoft.BingMaps”,’

    “Microsoft.BingWeather”,”Microsoft.ZuneVideo”,”Microsoft.ZuneMusic”,”Microsoft.Media.PlayReadyClient.2″,’

    “Microsoft.XboxLIVEGames”,”Microsoft.HelpAndTips”,”Microsoft.BingSports”,’

    “Microsoft.BingNews”,”Microsoft.BingFoodAndDrink”,”Microsoft.BingTravel”,”Microsoft.WindowsReadingList”,’

    “Microsoft.BingHealthAndFitness”,”Microsoft.WindowsAlarms”,”Microsoft.Reader”,”Microsoft.WindowsCalculator”,’

    “Microsoft.WindowsScan”,”Microsoft.WindowsSoundRecorder”,”Microsoft.SkypeApp”

    Instead of breaking the appx names up over multiple lines in the script you can just have one big entry like this (1 line in the script)

    $AppsList = “microsoft.windowscommunicationsapps”,”Microsoft.BingFinance”,”etc”,”etc”,”etc”

    Hopefully this should sort the problem for you (it has for me). If not then I would suggest building an instance of Windows 8.1 in HyperV or VM Ware – taking a snapshot then manually running the script from the PowerShell ISE to work out where the problem is re: syntax.

    I will also modify the word document with my updated powershell syntax.

    Cheers
    Damon

  6. Can you tell us more about this? I’d care to
    find out some additional information.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s