Git Product home page Git Product logo

get-productkey's Introduction

Get-ProductKey

Powershell cmdlet to retrieve product keys and OS information from local or remote system/s.

Retrieves the product key and OS information from a local or remote system/s using WMI and/or ProduKey. Attempts to decode the product key from the registry, shows product keys from SoftwareLicensingProduct (SLP), and attempts to use ProduKey as well. Enables RemoteRegistry service if required. Originally inspired by this script: https://gallery.technet.microsoft.com/scriptcenter/Get-product-keys-of-local-83b4ce97

Note that giving credentials with ProduKey requires running the process locally with those credentials, so they must work on the local machine.

The reason ProduKey was included is because it's great at getting keys SLP doesn't have registered, but as it can't get anything for VLK/MAK, querying SLP (and other WMI classes) is still needed.

.PARAMETER Computername
Strings. Name of the local or remote system/s. You may give multiple computernames.

.PARAMETER ShowOnlyValid
Switch. Output only fully valid entries (pingable, has WMI access).

.PARAMETER DontEnableRemoteRegistry
Switch. Do NOT attempt to enable the RemoteRegistry service if it's disabled.

.PARAMETER SkipRegProductKey
Switch. Skip attempting to decode the product key from the registry (non-VLK/MAK only, requires RemoteRegistry if remote).

.PARAMETER SkipDefaultProductKeys
Switch. Skip attempting to decode the default product keys from the registry.

.PARAMETER SkipOEMInfo
Switch. Skip outputting OEM info from WMI / registry.

.PARAMETER SkipProduKey
Switch. Skip attempting to use ProduKey for additional keys (requires RemoteRegistry access for remote machines).

.PARAMETER ProduKeyPath
String. Path to ProduKey.exe and its working directory. Default: "." (current directory)

.PARAMETER PromptForCredentials
Switch. Prompt for secure credentials to use.

.PARAMETER Credential
Secure credential object to use instead of the current user's credentials.

.EXAMPLE
PS> Get-ProductKey -Computername Computer1

OSDescription : Microsoft Windows 10 Pro
Source : SLP/WMI
ProductKey : XXXXX
Hostname : Computer1
OEMManufacturer : Dell, Inc.
OSVersion : 10.0.17134
ProductID : NNNNN-NNNNN-NNN-NNNNNN-NN-NNNN-NNNNN.NNNN-NNNNNNN
IP : 192.168.1.2
OEMModel : Optiplex 320
SLPLicenseStatus : Licensed
ProductName : Windows(R), Professional edition

OSDescription : Microsoft Windows 10 Pro
Source : ProduKey
ProductKey : XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Hostname : Computer1
OEMManufacturer : Dell, Inc.
OSVersion : 10.0.17134
ProductID : NNNNN-NNNNN-NNNNN-NNNNN
IP : 192.168.1.2
OEMModel : Optiplex 320
SLPLicenseStatus :
ProductName : Windows 10 Pro

get-productkey's People

Contributors

mattcarras avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.