A388

Cleaning up a Fresh Install of Windows 10 using PowerShell

Windows 10, in my opinion, is a great operating system, but it does have its quirks and annoyances. One major annoyance is the number of apps that come pre-loaded on a new installation. At my work, I wrote a PowerShell script around two years ago that does some configuration when domain joining a new computer. It removes the annoying apps, and locks down some settings, among other things.

I had been thinking about re-writing the script to be a bit more generic, and I did. You can find it by going to the TOOLS section and downloading it from there. Here, I will explain how to use it. The script will need to be ran for a total of three times for the best results.

Before we continue, be aware that this has been tested on Windows 10 version 1803 (April 2018) update only. You can follow along below or watch the video demonstration.

1st Run

You will first need to set the execution policy to unrestricted within PowerShell to allow the script to do its job. Open a PowerShell window in Administrator mode and run the following command:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Confirm:$false

Then find the downloaded copy of the script and right click on it and select Run with PowerShell. The first run will:

  • Set the power plan to High Performance
  • Disable UAC

After UAC is disabled, the computer will be restarted. Once it's up we'll do the second run.

2nd Run

After the computer has restarted, find and run the script the same way you did in the first run. The second run will:

  • Repeat 1st run
  • Disable hibernation
  • Attempt to run the Windows 10 Decrapifier script
  • Remove app packages
  • Remove OneDrive

If the Windows 10 Decrapifier script was not found in the same directory as my script, then a browser window will be opened to the download location. Download it and wait for the computer to restart to continue into the third run.

3rd Run

On the third and final run, we just re-run the script one more time. This time if the Decrapifier script is available, it will be invoked. The third run will:

  • Repeat 1st run
  • Repeat 2nd run

After the final restart you should have a clean fresh copy of Windows 10. The only annoying thing is that sponsored apps are not removed. You will have to right click and "Uninstall" them yourself, however, thanks to the Decrapifier script they will not reinstall themselves again. From here on out you can customize Windows 10 how you want it to be.