Easy way to check Windows activation status

Reading Time: 3 minutes

Windows activation status is a critical check for ensuring that your devices are properly licensed and secure. In this post, we’ll walk through a simple PowerShell detection script you can deploy via Intune to automatically verify whether Windows is activated on managed devices. By the end, you’ll have a quick, reliable method for monitoring activation status health across your organization—no manual inspections required.

Easy way to check Windows activation status

Introduction

Why it’s useful to check the activation status

Maintaining valid Windows activation ensures your devices are running genuine, fully supported software—unlocking access to security patches, feature updates, and Microsoft support services. Without activation, the devices may enter a reduced-functionality mode, display persistent “not genuine” notifications, or block personalization options—impacting both usability and security.

From a compliance standpoint, regularly auditing activation status helps IT teams demonstrate license adherence and avoid potential legal or financial penalties associated with unlicensed software. Automated checks also preempt end-user support tickets about missing features or update failures, freeing up help-desk resources for deeper issues.

Overview of using an Intune detection-only remediation script

This ensures that you are always aware of the activation state of your devices, which can help prevent issues related to unlicensed software.

Intune’s detection-only remediation script feature lets you deploy a PowerShell script that evaluates a condition—such as “Is Windows activated?”—and returns an exit code without taking corrective action.

Detection scripts are encoded in UTF-8 and configured in the Intune admin center under Devices > Manage devices > Scripts and remediations, then assigned to your Windows device groups for regular execution. When the detection script returns a non-zero exit code (e.g., 1), Intune flags the device as non-compliant in reporting dashboards, enabling you to trigger notifications or invoke a separate remediation workflow if desired.

Scheduling is automatic—Intune reruns these scripts every 24 hours (and on-demand)—so you always have up-to-date activation data without manual intervention. By choosing detection-only scripts and returning the appropriate output, you gain visibility into activation health without risking unintended changes on client devices.

Detect Activation Status

To detect the if a device has an activated version of Windows, we could run a detection only Remediations script and report the status back using a simple Write-Host at the end of the script.

That way we will be able to get the activation status in Intune portal under the Remediations script and decide on the next steps (e.g. deploy a configuration profile to activate Windows or reach the end user to manual activate it). Below is the script. You can also find it on my GitHub page.

# Query activation status via CIM
$Status = Get-CimInstance SoftwareLicensingProduct `
    -Filter "Name like 'Windows%'" |
  Where-Object { $_.PartialProductKey } |
  Select-Object -Property Description, LicenseStatus

try {
    # LicenseStatus 1 means activated; non-1 means not activated
    if ($Status.LicenseStatus -ne 1) {
        Write-Host 'Windows is not activated. Needs attention'
        Exit 1
    }
    else {
        Write-Host 'Windows is activated. No action needed'
        Exit 0
    }
}
catch {
    # On any error, log and mark non-compliant
    $errMsg = $_.Exception.Message
    Write-Error "Error checking activation: $errMsg"
    Exit 1
}

The message that we get in Intune under the Remediations script is shown below:

Conclusion

Automating your Windows activation checks with an Intune detection-only script gives you real-time visibility into device compliance without manual intervention. With just a few lines of PowerShell and a simple Intune configuration, you can flag unactivated machines, streamline support workflows, and ensure every device remains properly licensed. Deploy this lightweight solution today to keep your environment secure, compliant, and fully up to date—no more guesswork required!

References and Documentation

Other Interesting Posts

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *