Remove Built-in Apps in Offline media

Anonymous
2021-03-18T10:14:43.893+00:00

I want to remove built-in apps during a offline media installation.

I tried 2 methods:
Command Line:
powershell.exe -command "Set-ExecutionPolicy Bypass"
Command line:
powershell.exe -file "%ScriptRoot%\Remove_BuiltinApps.ps1"
Start in:
%ScriptRoot%

or

Set Task Sequence Variable
PSCommand
cmd /c powershell.exe -ExecutionPolicy Bypass -Command

Run Powershell Script
Remove_BuiltinApps.ps1

Both methods are not working and the powershell feature is checked inside the properties.
Anyone an idea how to configure this inside MDT?

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
852 questions
Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,919 questions
0 comments No comments
{count} votes

Accepted answer
  1. Simon Ren-MSFT 31,831 Reputation points Microsoft Vendor
    2021-03-19T02:54:55.957+00:00

    Hi,

    Thanks for posting in Microsoft MECM Q&A forum.

    1 It's recommended that we remove built-in apps firstly and then create a new OS image. We can remove a preinstalled app from a Windows image by using the DISM.exe tool or the DISM cmdlets in Windows PowerShell. For example:
    Dism /Image:c:\test\offline /Remove-ProvisionedAppxPackage /PackageName:microsoft.devx.appx.app1_1.0.0.0_neutral_en-us_ac4zc6fex2zjp
    For more detailed steps, please refer to:
    Remove a preinstalled app by using DISM

    2 We can also use customize PowerShell script to remove built-in apps (or default apps) in the reference images. For more detailed steps, please refer to the awesome blogs:
    Remove Built-in apps when creating a Windows 10 reference image
    Remove Built-in apps for Windows 10 version 1809

    Hope it helps. Thanks for your time.

    Best regards,
    Simon


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2021-03-19T15:04:24.213+00:00

    Hi @Simon Ren-MSFT

    Thanks a lot again. I used the first url of option 2.
    I changed to location of the script in from offline to online (State Restore)