I added a $SysPrep switch parameter and function on lines 7 - 17. This will run the following command: get-appxpackage | remove-appxpackage. This is required in order to be used successfully with SysPrep.
I also added a $StopEdgePDF parameter, for those who do not wish to stop Edge from being used as the default PDF viewer, or for those who worry about unintended consequences (not being able to potentially choose Edge without removing the specified registry keys).
You can now run the script with the switch parameter -SysPrep, along with -Debloat, and -StopEdgePDF.
I changed the $_.name on lines 24, 25, 32, and 33 to $_.packagename since the whitelisted apps "Photos" and "Store" were still being removed.
Now they shouldn't be removed.
I changed the $_.name on lines 24, 25, 32, and 33 to $_.packagename since the whitelisted apps "Photos" and "Store" were still being removed.
Now they shouldn't be removed.
On line 410 if you chose to run Interactively and wanted to Revert changes it would tell you that the Revert switch statement was not recognized. This is now fixed.
On line 450 if you chose to use the Noninteractive method it wasn't recognized. This is now fixed as well.
Upon launching the script you will see that the script will create a folder called Windows10Debloater which it will use to store logs. If it detects that it has already been created previously then it will tell you that the folder already exists. The path will be: C:\Windows10Debloater
I added logging. It will record a transcript of your session and then output the transcript file into C:\Windows10Debloater. These can be used for troubleshooting or if you get error messages.
I added a Noninteractive switch so that instead of you choosing between "Interactive" and "Silent" it will only ask you 1 question, instead of the "Interactive" one asking you a couple of questions.
The "Interactive" switch doesn't automatically reboot your machine.