Graphic : Lifehacker (Photos: Getty Images, Shutterstock

If you’re reading this, you probably know how to upgrade one version of Windows to another. Even though it’s an easy process, it’s still tedious and boring to watch Windows download and install, and then you have to spend more time moving through screens and tweaking settings. Meh.




If you, or someone you know, has been clinging to Windows 7 until the bitter end, you should know that your operating system won’t receive any more security updates past January 15. Now is as good a time as any to finally upgrade your system to Windows 10, especially since it might be free—and because I found a super-simple PowerShell script that makes it easy to perform an unattended upgrade.

In other words, you start the upgrade process, click a dialog box or two in the beginning, and you can then get up and go do something else while Windows 10 downloads and installs automatically. Your system will reboot when it needs to, and the next time you need to click the mouse, you’ll be a minute away from your brand-new OS. Upgrading doesn’t get much easier than this.


Getting started with PowerShell in Windows 7 SP1

Since we need PowerShell to do this quick little upgrade, and PowerShell comes baked into any version of Windows since Windows 7 SP1, make sure you’ve upgraded the operating system at least that far. In other words, just run Windows Update and install whatever it wants you to install (if anything).

Once you’re ready to begin, click on the Start button, type in Powershell, right-click on “Windows Powershell,” and select “Run as Administrator.”

As a security measure, PowerShell is set to not run scripts by default until you change a certain registry key. To do that, type this into Powershell and hit Enter when you’re done:

Set-ExecutionPolicy Unrestricted

You can close PowerShell now. Yes, that’s right.


Typing up your installation script

Download this .PS1 file to your computer. If it doesn’t exist, or you want to create this manually, open up a new text file and copy and paste the following (courtesy of the incredibly helpful /r/PowerShell subreddit):

$dir = “c:\temp“ mkdir $dir $webClient = New-Object System.Net.WebClient $url = “https://go.microsoft.com/fwlink/?LinkID=799445“ $file = “$($dir)\Win10Upgrade.exe“ $webClient.DownloadFile($url,$file) Start-Process -FilePath $file -ArgumentList “/quietinstall /skipeula /auto upgrade /copylogs $dir“ -verb runas


Delete the extra blank spaces between the lines, and you might also have to replace those quotes with straight quotes, since Kinja changes them to opening and closing quotes by default. Once you’ve done this, close Notepad and save your file with whatever name you want, but change its extension to .PS1 (from .TXT).


Starting your unattended upgrade

Right-click on your new .PS1 file and select “Run with PowerShell.” You’ll probably have to confirm at least one prompt, allowing “Microsoft Windows” to make changes to your computer, but that’s it. A PowerShell window will briefly appear and disappear, and then you won’t see anything else for some time.


Screenshot : David Murphy

If you’re paranoid, like me, you can check that the installation is running by pulling up Task Manager and making sure that the “Windows10UpgraderApp.exe” application is running. (You should see it early on in the process.) Otherwise, go do something else. Your system will automatically restart when it needs to, and the Windows 10 installation will fire off without any additional input from you.


You’ll know it’s done when your computer asks you to do something, which should look like this:

Screenshot : David Murphy


You’re basically just a screen or two away from completion, which should take you all of 15 seconds to check out. Once you hop into Windows 10, you’ll hopefully notice two things: One, all of your data and apps should be where they were originally (since we upgraded from Windows 7, rather than performing a clean install). There’s no guarantee that everything is there—certain programs may have been incompatible and couldn’t be brought along for the ride—but that’s an issue I’ll address in a later article.

The upgrade aspect is critical, though, as you should also have a fully activated version of Windows 10, assuming you came from an activated version of Windows 7. If not, entering your Windows 7 key should be all you need to activate Windows 10, and logging in with your Microsoft account should make the activation process even easier for any subsequent installations.


The Essential Windows Apps for 2018 There are so many Windows apps out there, that picking a list of the very best, most must-install… Read more

Don’t forget to reset PowerShell’s execution policy

Remember when we unshackled PowerShell and allowed it to run any scripts it wanted? Well, now’s a great time to reverse that, for security’s sake. Open up PowerShell with administrative privileges (same as before), and enter this:

Set-ExecutionPolicy Restricted

Screenshot : David Murphy


Once you’ve done that, you can close PowerShell and start tricking out Windows 10 to your liking. You probably won’t need to run Windows Update right away, however, as you should already have the most up-to-date version of the OS that Microsoft has available.