⚡ PowerShell 5.1+

Check "Disable Cortana" Status

Reads the current registry value behind the "Disable Cortana" tweak so you can confirm whether it's applied.

By WindowsScripting.com · 752 B
Test-DisableCortanaStatus.ps1
<#
.SYNOPSIS
    Checks whether "Disable Cortana" is currently applied.

.DESCRIPTION
    Reads HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search \ AllowCortana and reports its current value,
    or reports that it isn't set (falling back to the Windows default).

.EXAMPLE
    .\Test-DisableCortanaStatus.ps1
#>

[CmdletBinding()]
param()

$regPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search'

$value = Get-ItemProperty -Path $regPath -Name 'AllowCortana' -ErrorAction SilentlyContinue

if ($null -eq $value) {
    Write-Host "'AllowCortana' is not set at $regPath (using the Windows default)." -ForegroundColor Yellow
} else {
    Write-Host "Current value of 'AllowCortana': $($value.'AllowCortana')" -ForegroundColor Green
}