How to remove provisioned APPS for all users on Windows 10 and Windows 8.1 clients to create a clean SYSPREP image
search cancel

How to remove provisioned APPS for all users on Windows 10 and Windows 8.1 clients to create a clean SYSPREP image

book

Article ID: 185037

calendar_today

Updated On:

Products

Ghost Solution Suite

Issue/Introduction

The following article lists the steps that you must follow to run the attached bin files to remove the Windows Updates and to remove the provisioned Apps before you create a clean Sysprep image for Windows 10 or Windows 8.1 managed computers for Ghost Solutions Suite3.x

Set-up: Ghost Solution Suite version 3.x, Imaging for Windows 10 or 8.1

Following are the ways to disable updates and remove Apps:

  • Run the attached Bin files as mentioned in the article.
    Refer to this section.
  • Create and run the Run Script task with the details provided in this section.

Resolution

To Disable Windows updates using the script task provided with this article:

  1. Import theDisableWindowsAppsUpdates.bininto the Ghost Solution Suite console.
  2. Run the imported job on the managed client with Administrator context using the Specific user option in Client Run Environment.

To Remove the APPS:

  1. Import the“RemoveAppsForSysprep.bininto the Ghost Solution Suite console.

  2. Run the imported job on managed client using “Specific user” option on Client Run Environment while the respective “Specific user” should be logged-in while run.

  3. Repeat Step 2 for all users on the client by changing “Specific user” for every run with respective user logged-in.

Following are the contents of the DisableWindowsAppsUpdate.bin and the Remove AppsFor Sysprep.bin

To Disable Windows updates:

  1. Create a new Run Script task and copy the following commands:
    PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Unrestricted -Command ""Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 0""' -Verb RunAs | Out-Null}";

    PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Unrestricted -Command ""New-Item -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore""' -Verb RunAs | Out-Null}";

    PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Unrestricted -Command ""Set-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore -Name AutoDownload -Value 2 -Type DWORD -Force""' -Verb RunAs | Out-Null}";

  2. Run the Run Script task on the managed client with Administrator context using the Specific user option in Client Run Environment.

 

To remove the APPS:

  1. Create a Run Script task and copy the following contents into the task:

    PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Unrestricted -Command ""Get-AppxPackage -AllUsers | Remove-AppxPackage""' -Verb RunAs | Out-Null}";

    PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Unrestricted -Command ""Get-AppXProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online""' -Verb RunAs | Out-Null}";

  2. Run the Run Script task on the managed client using “Specific user” option on Client Run Environment while the respective “Specific user” should be logged-in when you run the task.
  3. Repeat Step 2 for all users on the client by changing “Specific user” for every run with respective user logged-in.