Created
August 11, 2022 14:48
-
-
Save virtualex-itv/3a991295ac5ce196ef6698973847a40a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################### | |
# 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