Please enable Javascript for better experience...
Get-LicenseInformation of vSphere
By Pranay Jha | May 4, 2016 | In Tips | Total Views [ 439 ]
Taged In
(0 Like)

# Set to multiple VC Mode
#if(((Get-PowerCLIConfiguration).DefaultVIServerMode) -ne "Multiple") {
#    Set-PowerCLIConfiguration -DefaultVIServerMode Multiple | Out-Null

# Make sure you connect to your VCs here

# Get the license info from each VC in turn
$vSphereLicInfo = @()
$ServiceInstance = Get-View ServiceInstance
Foreach ($LicenseMan in Get-View ($ServiceInstance | Select -First 1).Content.LicenseManager) {
    Foreach ($License in ($LicenseMan | Select -ExpandProperty Licenses)) {
        $Details = "" |Select VC, Name, Key, Total, Used, ExpirationDate , Information
        $Details.VC = ([Uri]$LicenseMan.Client.ServiceUrl).Host
        $Details.Name= $License.Name
        $Details.Key= $License.LicenseKey
        $Details.Total= $License.Total
        $Details.Used= $License.Used
        $Details.Information= $License.Labels | Select -expand Value
        $Details.ExpirationDate = $License.Properties | Where { $_.key -eq "expirationDate" } | Select -ExpandProperty Value
        $vSphereLicInfo += $Details
$vSphereLicInfo | Format-Table -AutoSize

Thanks for visiting here. Share this article if you found it useful.
Join Facebook Group
Like Facebook Page
Connect to twitter
Share this on Social Media

About the Author

Pranay Jha
Pranay Jha
Founder, Contributer
Follow me

facebook linkedin twitter G+ VMTN

My name is Pranay Jha, working in IBM as Technical Solution Architect for Virtualization platform. I have been working in IT for near around 11 years. Passionate to get involved as an Independent blogger for my blog I am carrying few industrial certifications as VMware vExpert 2016/2017, VCIX6, VCAP6-DCD, VCAP5-DCD/DCA, VCP6-DCVVCP5-DCV, VCA-Cloud, VCE-CIA, VSP, MCSE, MCITP, MCSA(Messaging). For any query or suggestion, please connect me at Thanks for visiting here.

Please SignUp/Login to comment...

Or comment as anonymous...
* Name
* Email ID
Facebook Likes