Removing default applications from win 10 1703 while creating a image

Welcome Forums General PowerShell Q&A Removing default applications from win 10 1703 while creating a image

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
7 months ago.

  • Author
    Posts
  • #93772

    Participant
    Points: 0
    Rank: Member

    I am creating a custom win 10 1703, image in which i am removing all the default installed applications. But in that effort few applications which i want to keep are also getting uninstalled.one of them is IE, which is now comes as on demand feature. In order to keep IE and remove other applications i am using below script. But when i use "Browser.InternetExplorer~~~~0.0.11.0" as the name of the property, i get blue screen during image capture, however script works fine with IE name, i cant find any other property for IE which i can use in this script. Could you please help.

    $WhiteListOnDemand = "NetFX3|Tools.Graphics.DirectX|Tools.DeveloperMode.Core|Language
    Sengar Shimbesh 9:41 PM:
    # White list of Features On Demand V2 packages
    Write-LogEntry -Value "Starting Features on Demand V2 removal"
    $WhiteListOnDemand = @(
    "NetFX3|Tools.Graphics.DirectX|Tools.DeveloperMode.Core|Language",
    "Browser.InternetExplorer~~~~0.0.11.0"
    )

    # Get Features On Demand that should be removed
    $OnDemandFeatures = Get-WindowsCapability -Online | Where-Object { $_.Name -notmatch $WhiteListOnDemand -and $_.State -like "Installed"} | Select-Object -ExpandProperty Name

    foreach ($Feature in $OnDemandFeatures) {
    try {
    Write-LogEntry -Value "Removing feature on demand: $($Feature)"
    Get-WindowsCapability -Online -ErrorAction Stop | Where-Object { $_.Name -like $Feature } | Remove-WindowsCapability -Online -ErrorAction Stop
    }
    catch [System.Exception] {
    Write-Warning -Message $_.Exception.Message
    }
    }

  • #98988

    Participant
    Points: 51
    Rank: Member

    Are you removing the apps? I've always used remove-appprovisioning for Windows 10 default apps like people, maps, camera, Candy crush, ect.. news

    • #99241

      Participant
      Points: 0
      Rank: Member

      Thanks!! Jeff.

      But we found a work around for this problem.

The topic ‘Removing default applications from win 10 1703 while creating a image’ is closed to new replies.