
Since this command also has the ability to target multiple computers, you can do this by providing the computer list as an argument to the ComputerName parameter and by invoking a couple of WMI methods. To do this, you can use the Get-WmiObject cmdlet. If PowerShell remoting isn't available on your systems for security reasons or simply is not enabled yet, you can also use WMI. If successful, a notification message for each computer will display.


This will run on each computer and change the product key. Invoke-Command -ComputerName SOMECOMPUTER -ScriptBlock Confirm this by running a simple command on each computer. However, to use this method, every target computer must have PowerShell installed and PowerShell remoting enabled and accessible. Since this script does not have the inherent capability to run on a remote computer, we'll use PowerShell remoting. Let's first cover using the slmgr.vbs script. One method is to use the slmgr.vbs script that comes on all Windows machines XP/2008 and higher. Since I'm assuming most IT pros don't do much locally on a system, we're going to focus on how to do this remotely across many computers at once. One might choose to use the command line when changing the product key as a piece of a bigger orchestration script perhaps or find it's quicker than bringing up a GUI tool. If an IT professional needs to add or change a product key on all her Windows systems, there are tools like the Volume Activation Tool (VAMT) or she can do it via the command line. For consumers, inserting a single product key isn't a big deal, but for IT professionals managing hundreds or thousands of Windows machines, it's not quite that simple. Since you can now install Windows without a product key, a lot of people are figuring out how to get a valid product key input into Windows to prevent those counterfeit messages from popping up all the time.

Typically, you input the product key a number of different ways when installing Windows but can also change it after the fact.
