blog
15 November, 2021
Roel van Bueren

Using Windows10Debloater.ps1 with Liquit Workspace

They are many reasons why a preinstalled Windows 10 (or Windows 11) OS may need be ‘stripped’ of certain applications and settings, where a more traditional wipe and load approach is not possible or not an option. Whether it’s about removing Bloatware or just simply getting rid of unwanted Xbox and Zune applications which are not to be used in an enterprise anyway.

Some time ago I came across Windows10Debloater.ps1 which is a Script/Utility/Application to debloat Windows 10, to remove Windows pre-installed unnecessary applications, stop some telemetry functions, stop Cortana from being used as your Search Index, disable unnecessary scheduled tasks, and more.

This script has been put up on Github open sourced. This is great, because we all have our preferences when it comes to removing applications and configuring Cortana, Telemetry, Edge and OneDrive and therefore it can be tweaked as much as you like. It seems it’s not actively supported anymore, but you can learn a few tricks from this script.

If you like to use this in a Package to be used with Liquit Workspace, just use the ‘Run uploaded script’ action in e.g. an Install action set, set the script engine to ‘PowerShell’, copy/paste the script into the Script field, set the Arguments to ‘-Debloat’ and run it in the ‘Device’ context:

You need to change a few things in the Windows10Debloater.ps1 script though, to make sure the script runs unattended and that is its usage of Prompts.

Search for all Prompt$ variables and replace it like this depending on what you would answer running this manually:

#$Prompt1 = [Windows.MessageBox]::Show($Ask, "Debloat or Revert", $Button, $ErrorIco)
$Prompt1 = "Yes"
#$Prompt2 = [Windows.MessageBox]::Show($EverythingorSpecific, "Everything or Specific", $Button, $Warn)
$Prompt2 = "Yes" 
#$Prompt3 = [Windows.MessageBox]::Show($EdgePdf, "Edge PDF", $Button, $Warn)
$Prompt3 = "Yes"

Also updated the section about CloudStore. These are the correct parameters which prevent from being prompted:

Write-Output "Removing CloudStore from registry if it exists"
$CloudStore = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore'
If (Test-Path $CloudStore) {
    Stop-Process Explorer.exe -Force
    Remove-Item $CloudStore -Recurse -Force -Confirm:$false
    Start-Process Explorer.exe -Wait
}

Windows10Debloater.ps1 is just an example script how to tweak Windows 10. Please test extensively in your test lab first.

NB1. There are same issues to be tweaked in the script like the remove of *nvidia* in the DebloatAll Function.

NB2. I’ve switched from using the DebloatAll function to DebloatBlacklist, because of the issue described here.

NB3. I’ve added “Microsoft.BingWeather” to the $Bloat variable

NB4. UnpinStart is not working anymore and might hang up your script, as described here.

Still have questions?

Contact us today

    We see you are interested in what we have to offer

    See for Yourself?

    Request Your Demo Now