Skip to content

Instantly share code, notes, and snippets.

@daurrutia
Created December 7, 2018 21:51
Show Gist options
  • Save daurrutia/af6b44d539b6a8124b5323bc6466c3d8 to your computer and use it in GitHub Desktop.
Save daurrutia/af6b44d539b6a8124b5323bc6466c3d8 to your computer and use it in GitHub Desktop.
Disable Microsoft Edge's InPrivate Browsing
# https://docs.microsoft.com/en-us/windows/client-management/mdm/policy-csp-browser#browser-allowinprivate
# https://github.com/MicrosoftDocs/windows-itpro-docs/blob/master/browsers/edge/includes/allow-inprivate-browsing-include.md
$path = 'HKLM:\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main'
if (Test-Path $path) {
New-ItemProperty -Path $path -Name AllowInPrivate -PropertyType DWORD -Value 0 -Force
}else{
New-Item -Path $path -Force |
New-ItemProperty -Name AllowInPrivate -PropertyType DWORD -Value 0 -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment