Skip to content

Instantly share code, notes, and snippets.

@jmconway
Created May 12, 2021 17:03
Show Gist options
  • Save jmconway/1378445771807d987bf945be858035d0 to your computer and use it in GitHub Desktop.
Save jmconway/1378445771807d987bf945be858035d0 to your computer and use it in GitHub Desktop.
Basic script to disable Cortana via the Registry during WDS/MDT deployments of Windows 10.
# Disable Cortana
$regPath = "HKLM:\\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
$regName = "AllowCortana"
$regValue = "0"
# If $regPath doesn't exist (which it likely doesn't by default), create it
if (!(Test-Path -Path $regPath)) {
New-Item -Path $regPath
}
# Then, create the new value
Set-ItemProperty -Path $regPath -Name $regName -Type DWORD -Value $regValue -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment