Skip to content

Instantly share code, notes, and snippets.

@daurrutia
Created June 25, 2018 15:12
Show Gist options
  • Save daurrutia/829371bde63d6a6bd8f6531dca605eb2 to your computer and use it in GitHub Desktop.
Save daurrutia/829371bde63d6a6bd8f6531dca605eb2 to your computer and use it in GitHub Desktop.
Disables Google Chrome Incognito Mode on Microsoft Windows
# http://dev.chromium.org/administrators/policy-list-3#IncognitoModeAvailability
$path = 'HKLM:\SOFTWARE\Policies\Google\Chrome'
if (Test-Path $path) {
New-ItemProperty -Path $path -Name IncognitoModeAvailability -PropertyType DWORD -Value 1 -Force
}else{
New-Item -Path HKLM:\SOFTWARE\Policies\Google\Chrome\ -Force |
New-ItemProperty -Name IncognitoModeAvailability -PropertyType DWORD -Value 1 -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment