Skip to content

Instantly share code, notes, and snippets.

Last active Nov 3, 2021
What would you like to do?
Chrome: Disable Guest and Incognito
defaults write BrowserGuestModeEnabled -bool false
defaults write IncognitoModeAvailability -integer 1
defaults write BrowserAddPersonEnabled -bool false
defaults write AllowDeletetingBrowserHistory -bool false
BrowserGuestModeEnabled: 0
IncognitoModeAvailability: 1
$registryPath = "HKLM:\SOFTWARE\Policies\Google\Chrome"
IF(!(Test-Path $registryPath)) {
New-Item -Path $registryPath -Confirm:$false -Force | Out-Null
New-ItemProperty -Name BrowserGuestModeEnabled -Path $registryPath -Confirm:$false -Force -Value 0 -PropertyType DWORD
New-ItemProperty -Name IncognitoModeAvailability -Path $registryPath -Confirm:$false -Force -Value 1 -PropertyType DWORD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment