How to activate windows 10 with powershell

Last Updated: Jan 17, 2024 by

If you’re a Windows 10 user, you may have encountered the need to activate your operating system at some point. While there are various methods to activate Windows 10, using PowerShell commands is a quick and efficient way to get the job done. In this article, we will guide you through the process of activating Windows 10 with PowerShell.

What is PowerShell?

Before we dive into the activation process, let’s first understand what PowerShell is. PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and a scripting language. It is used for administrative tasks and can be used to manage and automate Windows operating systems.

Activating Windows 10 with PowerShell

To activate Windows 10 with PowerShell, follow these steps:

  1. Open PowerShell as an administrator. You can do this by right-clicking on the Start button and selecting “Windows PowerShell (Admin)”.
  2. In the PowerShell window, type in the following command and press Enter:

slmgr /ipk

Note: Replace with your 25-character product key.

  1. Next, type in the following command and press Enter:

slmgr /ato

This command will activate your Windows 10 operating system.

  1. You should see a message confirming that your Windows 10 has been successfully activated.

Using a PowerShell Script for Activation

If you have multiple computers that need to be activated, using a PowerShell script can save you time and effort. Here’s how you can create and use a PowerShell script for Windows 10 activation:

  1. Open Notepad or any other text editor.
  2. Copy and paste the following code into the text editor:

$ProductKey = “” $ComputerName = “” $Credential = Get-Credential Invoke-Command -ComputerName $ComputerName -Credential $Credential -ScriptBlock { slmgr /ipk $using:ProductKey slmgr /ato }

Note: Replace with your 25-character product key and with the name of the computer you want to activate.

  1. Save the file with a .ps1 extension, for example, “activate_windows.ps1”.
  2. Open PowerShell as an administrator and navigate to the location where you saved the script.
  3. Type in the following command and press Enter:

Set-ExecutionPolicy RemoteSigned

  1. Next, type in the following command and press Enter:

.\activate_windows.ps1

  1. You will be prompted to enter the credentials for the computer you want to activate. Enter the username and password of an account with administrative privileges on that computer.
  2. The script will run and activate Windows 10 on the specified computer.

Conclusion

Using PowerShell commands or a PowerShell script is a simple and efficient way to activate Windows 10. It can save you time and effort, especially if you have multiple computers that need to be activated. We hope this guide has helped you successfully activate your Windows 10 operating system. If you have any questions or feedback, let us know in the comments.

Gulrukh Ch

About the Author: Gulrukh Ch

Gulrukh Chaudhary, an accomplished digital marketer and technology writer with a passion for exploring the frontiers of innovation. Armed with a Master's degree in Information Technology, Gulrukh seamlessly blends her technical prowess with her creative flair, resulting in captivating insights into the world of emerging technologies. Discover more about her on her LinkedIn profile.

Leave a Reply

Your email address will not be published. Required fields are marked *