Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Active Directory / Checking Windows Activation Status on Active Directory Computers

May 10, 2023 Active DirectoryPowerShellWindows 10Windows Server 2019

Checking Windows Activation Status on Active Directory Computers

In this article, we’ll show how to make sure your Windows copy is activated on the computer and check the Windows activation status from all computers in your Active Directory domain network using PowerShell.

Contents:
  • How to Check If Windows Is Activated?
  • Check Windows Activation Using PowerShell
  • Get Windows Activation Status on AD Computers with PowerShell

How to Check If Windows Is Activated?

First of all, let’s look at how to check the Windows activation status on your computer. You can view the Windows activation status using the Settings app (in modern Windows 10 and Windows 11 builds).

  • On Windows 10 and Windows Server 2022/2019/2016, go to Settings -> Update & Security -> Activation (or run the ms-settings:activation URI command to access the ms-settings quickly)
  • In Windows 11, open Settings -> System -> Activation
Today Microsoft offers to upgrade from the latest Windows 10 builds to Windows 11 for free. If a computer with a digital Windows 10 license is registered in your Microsoft account, then after upgrading to Windows 1 the computer will automatically check the digital license and activate Windows.

You may see one of the following activation statuses:

  • Windows is activated using your organization’s activation service – it means that your Windows copy is activated on a corporate KMS server (FAQ on KMS Activation); Windows is activated using your organization’s activation service
  • Windows is activated with a digital license – your Windows copy is activated using a digital license that is not linked to a Microsoft user account; Windows is activated with digital license
  • Windows is activated with a digital license linked to your Microsoft account
  • Not Activated – Windows reported that no product key was found on your device. Error code: 0xC004F214 – Windows is installed without a product key and is not activated.

You can get Windows activation from a command prompt. To do it, use the SLMgr.vbs script, which allows managing Windows licenses and activation. Run the command prompt (cmd) as an administrator and enter the command below:

slmgr /xpr

slmgr.vbs xpr - check activation status command prompt

In some seconds a window with “The machine is permanently activated” message appears.

If Windows is not activated, you will see the message: Windows is in Notification mode.

Tip. If you want to display the activation status in the command prompt console, use this command:

cscript slmgr.vbs -xpr

Check Windows Activation Using PowerShell

You can use PowerShell to get Windows activation information on a local or remote computer. Run the following command to get data from CIM (WMI):

Get-CimInstance SoftwareLicensingProduct -Filter "Name like 'Windows%'" | where { $_.PartialProductKey } | select Description, LicenseStatus

Possible LicenseStatus values:

  • 0 – Unlicensed
  • 1 – Licensed
  • 2 – OOBGrace
  • 3 – OOTGrace – the computer configuration has been changed, and it cannot be activated automatically, or more than 180 days passed
  • 4 – NonGenuineGrace
  • 5 – Notification – Windows trial period is over
  • 6 – ExtendedGrace (you can extend the Windows evaluation period several times using the slmgr /rearm command or convert the evaluation to a full version)

The screenshot below shows that LicenseStatus = 1. It means that Windows is activated using a retail product key (Windows(R) Operating System, RETAIL channel).

PowerShell: Check if Windows is Activated

To get an activation status of a remote computer, specify its name in the -ComputerName parameter:

Get-CimInstance SoftwareLicensingProduct -Filter "Name like 'Windows%'" -ComputerName mun-srv03 |where { $_.PartialProductKey } | select Description, LicenseStatus

The VOLUME_KMSCLIENT channel string means that the computer is activated on the KMS server.

check windows activation command line

Or use Enter-PSSession or Invoke-Command WinRM cmdlets to access a remote computer.

Get Windows Activation Status on AD Computers with PowerShell

You can use PowerShell to remotely get the activation statuses of Windows desktop computers and Windows Server hosts in an Active Directory domain. You can see an example of the script below.

To get a list of computers in a domain, the Get-ADComputer cmdlet from the Active Directory for PowerShell module is used. This PowerShell script checks the availability of each computer in Active Directory in turn (a simple ICMP ping using Test-NetConnection), gets a build and version of the OS installed on them and Windows activation status.

enum Licensestatus{
Unlicensed = 0
Licensed = 1
Out_Of_Box_Grace_Period = 2
Out_Of_Tolerance_Grace_Period = 3
Non_Genuine_Grace_Period = 4
Notification = 5
Extended_Grace = 6
}
$Report = @()
$ADComps = Get-ADComputer -Filter {enabled -eq "true" -and OperatingSystem -Like '*Windows*'}
Foreach ($comp in $ADComps) {
If ((Test-NetConnection $comp.name -WarningAction SilentlyContinue).PingSucceeded -eq $true){
$activation_status= Get-CimInstance -ClassName SoftwareLicensingProduct -ComputerName $comp.name -Filter "Name like 'Windows%'" |where { $_.PartialProductKey } | select PSComputerName, @{N=’LicenseStatus’; E={[LicenseStatus]$_.LicenseStatus}}
$windowsversion= Get-CimInstance -ClassName Win32_OperatingSystem -ComputerName $comp.name| select Caption, Version
$objReport = [PSCustomObject]@{
ComputerName = $activation_status.PSComputerName
LicenseStatus= $activation_status.LicenseStatus
Version = $windowsversion.caption
Build = $windowsversion.Version
}
}
else {
$objReport = [PSCustomObject]@{
ComputerName = $comp.name
LicenseStatus = "Computer offline"
}
}
$Report += $objReport
}
$Report |Out-GridView

The script is available in my GitHub repo: https://github.com/maxbakhub/winposh/blob/main/ActiveDirectory/AD_Computers_Check_Windows_Activation_Status.ps1

The information about Windows activation status on domain computers is shown in the form of an Out-GridView table. Or you can export it to a CSV file (Export-Csv -Path .\ad_windows_activation_report.csv -NoTypeInformation).

PowerShell function to check Windows activation on computers in Active Directory domain

You can find a similar PowerShell script to check Microsoft Office activation status on domain computers.

Thus, you can quickly find all non-activated (unlicensed) copies of Windows on computers in your domain.

2 comments
4
Facebook Twitter Google + Pinterest
previous post
Configuring Multiple VLAN Interfaces on Windows
next post
How to Deploy Windows 10 (11) with PXE Network Boot

Related Reading

Configure NTP Time Source for Active Directory Domain

May 6, 2025

View Windows Update History with PowerShell (CMD)

April 30, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

Uninstalling Windows Updates via CMD/PowerShell

April 18, 2025

Allowing Ping (ICMP Echo) Responses in Windows Firewall

April 15, 2025

2 comments

sajid June 27, 2022 - 12:48 pm

I can see your website is the most valuable asset for IT person.
it will also be better to make video one ever possible.

Reply
Andrey July 23, 2022 - 6:31 pm

Please never change the content to video. A written article is much more objective and quicker to assimilate. This type of information in video form is slow and unproductive.

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Configure Google Chrome Settings with Group Policy
  • Get-ADUser: Find Active Directory User Info with PowerShell
  • Allow Non-admin Users RDP Access to Windows Server
  • How to Find the Source of Account Lockouts in Active Directory
  • How to Disable or Enable USB Drives in Windows using Group Policy
  • Get-ADComputer: Find Computer Properties in Active Directory with PowerShell
  • Configuring Proxy Settings on Windows Using Group Policy Preferences
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top