Windows PowerShell is a utility that lets you automate Windows features including activation of the operating system. You must activate Windows with a valid license before all Windows features are available to the user. PowerShell is an extended form of the Windows command prompt that you can use to customize windows from a window that looks like the DOS prompt.
Click the Windows "Start" button and click "All Programs." Click "Microsoft PowerShell," then click "PowerShell" to open the command prompt.
Type "Set-ExecutionPolicy unrestricted" and press "Enter." This command sets PowerShell to allow unrestricted access to the Windows settings.
Query the current license object. You use this object to activate the license, but you must first specify your computer name and query the computer's WMI object. Type the following code to set up the object:
$service= get-wmiObject -query "select * from SoftwareLicensingService" -computername computer
Replace "computer" with the computer name.
Install the license key. The following code adds the Windows activation license to the computer:
Replace "$key" with your license key for Windows.
- Ryan McVay/Photodisc/Getty Images