TPLEX is a Microsoft Cloud Consulting corporation and the preferred Microsoft Azure partner.

go to site introduction with thesis statement example discursive essay sample animal rights paper https://www.mitforumcambridge.org/multiple/editing-and-proofreading-jobs/2/ https://elkhartcivictheatre.org/proposal/do-you-indent-paragraphs-in-a-college-essay/3/ source site how to start a history paper source site follow url click here essay conflict follow link https://lajudicialcollege.org/forall/custom-writer/16/ the major difference between a case study and a single-case experimental design study is that: mitos y verdades sobre el viagra nexium misleading advertisement watch follow link competitive edge resume writing service levitra west manchester indian cochcine essay writing tips and techniques live homework help for intel employees presentation speech writer mark hughes viagra how to write reserch paper https://rainierfruit.com/viagra-pfizer-discount/ levitra holland rezeptfrei kaufen thesis proposal on wireless sensor networks writing your thesis paul oliver get link (USA) +1(310) 402 2381
Email: info@tplex.com

TPLEX
7225 Crescent Park West, Los Angeles, CA 90094, USA

Open in Google Maps
QUESTIONS? CALL: +1.310.402.2381
  • HIRE US
  • ABOUT TPLEX
  • BLOG
  • PARTNERS
  • CAREERS
  • CONTACT US
  • FAQ
FREEQUOTE
  • Home
  • Blog
  • Networking
  • Change a product key remotely with Power Shell
January 19, 2021

Change a product key remotely with Power Shell

Change a product key remotely with Power Shell

by Aryan Sharma / Monday, 23 January 2017 / Published in Networking

One of the annoyances of dealing with industrial software is the licensing. Even though software vendors should obtain payment for their work, it’s always been a essential evil in the IT sector. Windows is no dissimilar. Anyone who’s use Windows before knows about the invention key (Product Key). It’s that long string of lettering separated by dashes and hyphens that we often search emails, MSDN and other resources for when we do not remember which one to employ.

Usually, you input the product key a numeral of altered ways when installing Windows but can also modify it after the fact. As you can now install Windows without using a product key, a lot of peoples are figuring out how to get a applicable product key to input into Windows to avoid those imitation messages from pop up all the time. For customers, inserting a unique product key isn’t a big task or deal, but for IT professionals and experts, managing thousands of Windows machines simultaneously, it’s not quite that simple.

If an IT professional expert requires adding or changing a product key on all his Windows systems, there are so many tools like the VAMT (Volume Activation Tool) or he can do it via the command prompt line. One may prefer to use the command process when altering the product key as a section of a bigger orchestration script possibly or find it’s faster than bring up a graphics user interface tool.

Since I’m considering most IT professionals will not do much close by on a system, we are going to spotlight on how to accomplish this remotely across many systems at one time. To do that, a couple of ideas are there. One process is to make the use of slmgr.vbs script that comes on all Windows apparatus XP/2008 and advanced. Otherwise, WMI can complete this. Either moves towards should get the job finished.

Let us first cover up by using the slmgr.vbs script. Since this script does not have the intrinsic potential to install on a remote system, we will use Power Shell remoting here. Though, to make the use this technique, each objective system must have Power Shell already installed and Power Shell remoting enabled and easy to get to. Verify this by running a simple command on each computer system.

 

Invoke-Command -SyetemName SOMECOMPUTER -ScriptBlock {1}

 

 

If this proceeds to 1, then it’s working fine. Otherwise, if any mistake text prompts, further examination is in order.

Once you have established that Power Shell remoting is accessible on each computer system, you will then necessitate finding out how to recover each computer system’s name. You may have done this previously in the action above. If not, ordinary ways comprise grabbing computer system names from text records with Get-Content using the Path factor when one system exists on each line in a text folder.

 

$computers = Get-Content -Path C:\systems.txt

 

 

Another ordinary way to recover computer system names is through the Get-ADSystem cmdlet accessible in the Active Directory module (ADM).

 

$computers = Get-ADSystem -Filter * | Select-Object –Expand Property Name

 

 

Despite, you will simply require to creating a compilation of system names in one way or another. Here, We will just physically describe the list.

 

$Systems = 'System1','System2','System3','System4','System5'

 

 

After completing this, you have to find out the syntax to call upon slmgr.vbs. Fortunately, this is quite simple and easy.

 

slmgr -ipk <ProductKeyValueHere>

 

Next, we will use Invoke Command once more and forward this command to each system all in one line.

 

Invoke Command -SystemName $systems -ScriptBlock { slmgr -ipk <ProductKeyValueHere> }

 

This will run on each system and alter the product key for each one. If this successful, a warning or notification message on each computer system will display.

Change product key

If Power Shell remoting is not obtainable on your computer systems for safety reasons or simply is not enable yet, you can also make the use of Windows Management Instrumentation (WMI). To do this, you can employ the Get WMI Object command. Since this command also has the capability to intention multiple computer systems, you can do this by provide the system list as an squabble to the SystemName constraint and by invoking a couple of WMI processes.

 

$sls = Get-WMI Object -Query 'SELECT * FROM Software Licensing Service' -SystemName $systems

 

 

This command will reach out to each remote system in the $system collection via DCOM and queries the WMI ordnance of each system.

1 Finally, call a group of methods to complete the job.

2@($sls).foreach({

3 $_.InstallProductKey(<ProductKeyValueHere>)

4 $_.RefreshLicenseStatus()

5 })

The loop above reads each example of WMI returned from Get-WMI Object called before and primarily invokes the InstallProductKey() process. This alters the product key but does not pertain it. To pertain the product key value, it then calls to RefreshLicenseStatus(). This allows Windows to be familiar with the new product key value.

That’s all there is to transform a product key on one, or a hundred systems in a short time! By using Power Shell, after defining the procedure for a particular computer system, increasing it to many others is a inconsequential task.

  • Tweet

About Aryan Sharma

What you can read next

Software Testing Companies in USA
Step By Step Guide To Use Powershell Azure To Tweet Environment Data of IoT
Schedule user account closure with PowerShell

Featured Posts

  • Schedule user account closure with PowerShell

    0 comments
  • AZURE ROLES: SEND EMAIL USING SENDGRID

    0 comments
  • PowerShell is the Most Excellent way to Manage Microsoft Azure Cloud

    0 comments
  • Eight Major Benefits of Microsoft Power BI (Business Intelligence)

    0 comments
  • Azure Tutorial: Predicting Gas Prices using Azure Machine Knowledge Studio

    0 comments

Recent Comments

    Archives

    • February 2017
    • January 2017
    • December 2016

    Categories

    • Networking
    • Technology

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    • Industries
    • Services
    • Technologies
    • Blog
    • About US
      • Hire Us
      • Careers
      • Contact Us

    NEWSLETTER SIGNUP

    By subscribing to our mailing list you will always be update with the latest news from us.

    We never spam!

    GET IN TOUCH

    +1(310) 420-0495
    Email: info@tplex.com

    Technology PLEX
    7225 Crescent Park West, Los Angeles, CA 90094, USA

    Open in Google Maps

    over a year agoOffshore Outsourcing Services with best technologies. #Technology #Software #IT #Cloud https://t.co/JrAIRPhXVw
    Follow @TechnologyPLEX
    • GET SOCIAL

    © 2017 TPLEX. All Rights Reserved.

    TOP