Design a site like this with
Get started

ID windows evaluation licenses time bombs!

I’ve been using a PowerShell script to check my home network/lab assets for many years, as time has gone on, and I’ve added and removed functions from it. Additional details are available on this post from last year:

Powershell health check script – GetVpro (

Sometime in the past few years, I removed a function I had to check for remaining evaluation license days on windows server / desktop editions. I had removed it, as like a lot of lab setups, my assets are in a state of flux. I’ll stand-up a PVS , file server or other windows asset for learning, or to help trial something for a client, then I’ll delete the VM(s) 

As time has gone on, I’ve been the benefit of keeping some assets up FOREVER, such as my domain controllers. For these, I’ve acquired legit keys from past employers or via the buy/sell market. As of last week, I had thought that all my key infra windows servers were licensed, but noted my second domain controller was offline. As you may be aware, when you hit the end of a windows evaluation license , the asset will boot, remain up, then gracefully shutdown after a period of time.

Monday morning, my daily 10:30 AM Get-AssetHealth report showed me my second DC was offline, I powered it on, made some coffee, came back later on, and noted she was offline again! Logging on confirmed the issue, 0 days left on the eval , oops!

I went back to my list of spare keys, and quickly converted the trial to a legit install via the following one-liner:

DISM /online /Set-Edition:ServerStandard /ProductKey:YOUR-LEGIT-KEY-12345 /AcceptEula

Crisis averted, but what other treasures await on my other 20+ VMs at home? Time to add back the Get-LicensedDays remaining function to my Get-AssetHealth script! Here it is:

Function Get-LicDaysRemain {
    Param ($Asset)
    $LicDaysRem = Get-CimInstance SoftwareLicensingProduct -ComputerName $Asset -Filter "ApplicationID = '55c92734-d682-4d71-983e-d6ec3f16059f'" | Where-Object -FilterScript {$_.LicenseFamily -like "*eval*"} `
    | Select-object -expand GracePeriodRemaining

    IF ($LicDaysRem -ne $Null) {  
        $LicDaysRem = new-timespan -minutes $LicDaysRem | Select-object -ExpandProperty Days    
        Write-warning "Remaining licensing days left = $LicDaysRem"


    Else {

        $LicDaysRem = "Valid license installed"

    Return $LicDaysRem

Running the update Get-AssetHealth script, I found another 5 assets that are set to time-out their windows server / desktop evaluations in the next month.

However, they aren’t critical to home lab infra, so I’ll probably just re-build them using a golden image, or packer which I learned last year



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: