Windows 10/11 Decrapifier (original) (raw)

Description

!PLEASE READ THIS AND THE SCRIPT ITSELF BEFORE RUNNING IT!

This way, no surprises!

Windows 10/11 Decrapifier

A cleanup script for Windows 10 18XX/19XX/2XXX+ aiming to get a decluttered default experience on regular Pro or Enterprise installs. Also sets most privacy settings to “opt-in” by default.

Will also work for Windows 11! The only thing right now is that the start menu won’t be cleared (the layout XML is different than Windows 10)

Not recommended for 1709 and earlier - although it will work, some settings will not. Version 2 is still available and works great on those older Windows builds.

Editable variables are near the top of the script. There are 2: one for the apps you want to keep, and custom XML for a start menu layout.

If run with no switches, the script disables some unnecessary services and scheduled tasks. Removes all UWP apps except for some useful ones and ones you specify. Disables Cortana, OneDrive, restricts default privacy settings and cleans up the default start menu (not the start menu of the account it is run from though). Creates a transcript at SYSTEMDRIVE\WindowsDCtranscript.txt.

Tested and works great in 1809 - 2004.

Switches:

-allapps: Removes ALL apps including the store. Make sure this is what you want before you do it. It can be tough to get the store back.

-leavetasks: Leaves scheduled tasks alone.

-leaveservices: Leaves services alone.

-appaccess: Leaves privacy/access options alone - depending on your usage, some issues can be prevented by leaving them with default (unrestricted) permissions. They are set to restricted by default in this script.

-clearstart: Empties the start menu completely leaving you with just the apps list.

-onedrive: Leaves all OneDrive content fully functional.

-tablet: Use this for tablets or 2-in-1s to leave location and sensors enabled.

-cortana: Leave Cortana and web enabled search on.

-xbox: Leave xbox apps and related items.

-nolog: Prevents transcript from being created at SYSTEMDRIVE\WindowsDCtranscript.txt.

-appsonly: Only removes apps, doesn’t touch privacy settings, services, and scheduled tasks. Cannot be used with -settingsonly switch. Can be used with all the others.

-settingsonly: Only adjusts privacy settings, services, and scheduled tasks. Leaves apps. Cannot be used with -appsonly switch. Can be used with all others (-allapps won’t do anything in that case).

If you have any questions or problems to report please come to the user group! It is the best place to do so as I don’t check the comments section here that often.

Decrapifier user group:
https://community.spiceworks.com/user-groups/windows-decrapifier-group

Single machine how-to:
https://community.spiceworks.com/how_to/148624-how-to-clean-up-a-single-windows-10-machine-image-using-decrapifier

Common questions/issues:
https://community.spiceworks.com/topic/2149611-common-questions-and-problems?page=1#entry-7850320

MDT how-to (old, no longer supporting this although it will work):
https://community.spiceworks.com/how_to/150455-shoehorn-decrapifier-into-your-mdt-task

Previous version of Decrapifier (for 1709 and earlier, also no longer supporting):
https://community.spiceworks.com/scripts/show/3977-windows-10-decrapifier-version-2

Source Code

script.txt (34 KB)

EXCELLENT! I’ve been waiting for this! Although I’ve made some edits to the Decrapifier V2, I can easily add those in here. And I love how you made the Start Menu XML customization near the top, plain and easily found and editable. I’ll throw this script on a VM and test it out. Thanks again for all your work!

brfr (brfr) July 17, 2018, 11:56am 3

I want to remove the all apps but leave the store, calc, paint. So the -allapps isn’t an option. Does the appsonly include those three as well? How would I exclude certain apps?

Awesome Job. I’ve been trying to do something like this myself, you’ve saved me many hours of time. Thanks

jneurath (Dashrender) July 17, 2018, 7:33pm 5

-allapps removes all apps. skipping -allapps leaves the following; $GoodApps = “camera|microphone|store|calculator|sticky|windows.photos|soundrecorder|mspaint” You can add to this list, for example, Camera and Microphone were added by me.

So I think this may have broken my mic input, but I really don’t know how. If anyone has a similar issue I would love a push in the right direction. It sees my audio device, however it no longer shows any signs of a signal, neither in the standard windows audio device menus, or discord, which is primarily where I use my mic. I used an audio test website that somehow was able to see the audio just fine, which I thought was strange. Yes, I’ve uninstalled and reinstalled drivers for my audio interface, disabled devices etc. etc. Basically anything I could mess around with in settings I did to no avail. Last ditch effort to post here just incase there was some sort of functionality that this could have removed that I was not aware of.

csand (csand) July 18, 2018, 1:50am 7

Should be able to just go start->settings->privacy and turn on permissions for the mic. The script makes them off by default. The - appaccess switch will bypass this behaviour. Remember people read the script through before you run it folks, it’s all commented and might save you some surprises :slight_smile:

Thanks for the GRAET script! what happened to the -allusers switch? how do i run it for all users?

csand (csand) July 18, 2018, 2:42pm 9

Allusers is implied now all the time, so no need for the switch :slight_smile:

Thank you m8 for your excellent up-to-date script. Awesome Job! There is only one problem. The scripts seems to be not working with Windows 10 Pro from the latest MSDN ISO: en_windows_10_consumer_edition_version_1803_updated_jul_2018_x64_dvd The script will complete but with the error below. Result not all the APPS are removed. I can’t see whether it also applies to settings. Running the script twice will result in the same error but it seems that all the APPS are removed. Simulation: Download en_windows_10_consumer_edition_version_1803_updated_jul_2018_x64_dvd Running fine on en_windows_10_consumer_editions_version_1803_updated_march_2018_x64_dvd. Same script, same settings: “Run with no switches”. Error: Removing many apps and provisioned appx packages for this machine… Remove-AppxProvisionedPackage : Unspecified error At C:\image\test3.ps1:128 char:98 + … goodapps} | Remove-AppxProvisionedPackage -online -erroraction silent … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:slight_smile: [Remove-AppxProvisionedPackage], COMException + FullyQualifiedErrorId : Microsoft.Dism.Commands.RemoveAppxProvisionedPackageCommand Disabling some unecessary scheduled tasks…

justynkemple (justynkemple) July 21, 2018, 2:33pm 11

Love the script. One issue I am having is apps like Xbox Microsoft soltiare are remaining. Any guess?

ryanfike (ryanfike) July 23, 2018, 6:44pm 12

Is there a way with in this script to set IE11 as default for all users and pin it to the taskbar?

tonyinglima (tonyinglima) July 25, 2018, 2:39pm 13

This script ROCKS!! Question about the start menu layout. I would like to add the following that customized the task bar pin list. How can I incorporate the following with your script? Thanks in advance! I really do appreciate what you do! Tony

Testing… . . You rock! … Well done… Great job . .

jasond8 (jasond8) July 25, 2018, 5:10pm 15

Nevermind… Poor copy and paste on my part lol. It was the link that was added at the bottom.

Zuco (Zuco) July 25, 2018, 5:17pm 16

tonypearce (tonypearce) July 26, 2018, 1:00am 17

Hi, I found this thread through searching on a few win10 sysprep fail errors I have when trying to update a build thats around a year old now. I’ve tried installing win10 pro as a fresh install from an iso created by myself using the media creation tool. After installing, there were still a couple of updates that were installed and sysprep fails afterwards. Will this decrapifier allow me to sysprep successfully with an updated win10 pro build? I dont want to make the build with any optional microsoft store apps but after imaging, I would like to install linux from the microsoft store as it seems to be moved there now. I’ve already wasted two days trying to make a new build and failing so while waiting for a response I think I’ll re-do the build and try this script anyway.

mark243 (Markle Sparkle) July 27, 2018, 1:21pm 18

Love this script! It’s even better than the previous decrapifiers. I need some help though! HOW do I RE-Enable OneDrive? I have been running this script WITH the ‘-onedrive’ switch because some people here use it, and we’ve made the switch to O365 Of course I omitted the switch on my last computer and of course this person uses OneDrive EXTENSIVELY. So what do I do to get OneDrive back once it’s been thrashed with this most excellent Decrapifier-1803 script?

Zuco (Zuco) July 27, 2018, 1:43pm 19

Mark - My understanding is that One Drive that’s in Windows 10 is different (Consumer version) then One Drive for Office365 that’s the business version. When you install the O365 client you should get the One Drive for Business and not need to make a change on the script.

csand (csand) July 27, 2018, 2:48pm 20

Hey Mark, join up to the user group linked int he script, there is a “common questions” thread in there and it shows you the could of reg chnges you need to make to let OneDrive run again if you forgot the -onedrive switch. cheers