Skip to content
Menu

Windows Not Activated - Activation Status and Edition

Reads Windows activation, edition and license channel. It flags no active license and can alert on Home editions. It shows the last five key characters when available.

Windows not activated - activation status and edition is free for members.

Enter your email to create your free account and get the file.

We'll email you the script and the weekly MSP Outpost email. Unsubscribe anytime. Privacy policy.

Already a member? Sign in.

Be the first to review Windows not activated - activation status and edition. Tell other MSPs how it worked for you.

Write a Review

LanguagePowerShell
Runs onWindows 10, Windows 11, Windows Server 2016+; runs as SYSTEM
NeedsPowerShell 5.1; the Software Protection service
Read-onlyReads, changes nothing

What It Does

The script is read-only. It reads the Windows licence through SoftwareLicensingProduct, the same data as slmgr /dli, and checks activation and edition.

For activation, the script looks for a Windows license with a partial key and a status of Licensed. One such license is enough to pass. If none is Licensed, it alerts and shows any remaining grace time. If it finds no Windows license with a partial key, it alerts that there is no product key installed.

For edition, Windows Home, Home N and Home Single Language cannot join a domain or be managed like a business PC, so these editions raise a finding by default. The script does not check how the PC is used. Turn that check off with AlertOnHomeEdition false for a fleet where Home is expected.

The table also shows the edition, the licence channel, such as Retail, OEM, Volume KMS or MAK, and the last five characters of the product key when available. A volume licence activated by a key management server shows Licensed while it is in its 180-day renewal window, and the script does not alert on the renewal countdown, only on a real failure.

Before You Run It

  • Set AlertOnHomeEdition to false for a fleet where Home edition is expected.
  • Fix an activation alert in your licensing, not on the PC. The script only reports.
  • Know that the last five characters of the key are shown. Do not share the table widely.
  • Schedule it weekly in your RMM and alert on exit 1.

Type and Risk

  • Type: Monitor. It checks one condition. It exits 1 when it finds the problem, so your RMM can alert on it, 0 when all is well, and 2 when it could not run.
  • Risk: Low. It reads and changes nothing.
  • Restart: It never restarts the machine.
  • Typical run: Under 15 seconds.
  • Example answer: "Windows 11 Pro is activated (Volume KMS channel)"
  • Tested before listing on Windows 11 with Windows PowerShell 5.1, run as SYSTEM, against its own test cases.

Inputs

Pass an input as an argument (-Name value), as an environment variable with the same name, which is how most RMMs pass script variables, or change its default in the param() block at the top of the script. An argument wins over an environment variable, which wins over the default.

  • AlertOnHomeEdition: Alert when the edition is Windows Home (any Home variant), even when it is activated. true or false. Default true.

Every script also takes DryRun, OutputFormat (Text, Answer, Json or Csv), ExportPath and ResultField, which writes the answer to an RMM custom field.

License

Provided "as is" under the MIT License, without warranty of any kind. Test before production use. MSP Outpost and User First Digital Inc. accept no liability for any damage or loss.

The Script

test-windows-activation.ps1 · 811 lines · 40.8 KB

Free for Members

Create a free account or sign in to read, copy and download this script.

Welcome Back

Sign in to your MSP Outpost account.