Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virtualex-itv/3a991295ac5ce196ef6698973847a40a to your computer and use it in GitHub Desktop.
Save virtualex-itv/3a991295ac5ce196ef6698973847a40a to your computer and use it in GitHub Desktop.
###########################################
# Get VMware Workstation License Key #
# https://kb.vmware.com/s/article/1000069 #
# #
# Author: virtualex (Alex Lopez) #
###########################################
$softwareName = 'VMware Workstation'
Write-Host -F Yellow Retrieving $softwareName Pro License Key...`n
$re = (((Get-WmiObject -Class Win32_Product) | ? { $_.Name -match $softwareName }).Version).Split('.')[0]
If ( [System.Environment]::Is64BitOperatingSystem ) {
$registryPath = (Get-ChildItem 'HKLM:\SOFTWARE\WOW6432Node\VMware, Inc.\VMware Workstation\' | ? { $_.Name -match $re }).Name
} else {
$registryPath = (Get-ChildItem 'HKLM:\SOFTWARE\VMware, Inc.\VMware Workstation\' | ? { $_.Name -match $re }).Name
}
Write-Host -F yellow Your $softwareName Pro license key is:`n`n(Get-ItemProperty Registry::$registryPath).Serial`n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment