en-US windows user

View menu: Disable Source menu option

Verified with Windows 11 26H2 — updated on July 23, 2026 Supported on: At least Internet Explorer 5.0

Windows 11 26H2

Path in the GPO console

User Configuration\Administrative Templates\Windows Components\Internet Explorer\Browser menus

Registry

HKCU Software\Policies\Microsoft\Internet Explorer\Restrictions
Value name:
NoViewSource

Description

Prevents users from viewing the HTML source of Web pages by clicking the Source command on the View menu. If you enable this policy, the Source command on the View menu will appear dimmed. If you disable this policy or do not configure it, then users can view the HTML source of Web pages from the browser View menu. Caution: This policy does not prevent users from viewing the HTML source of a Web page by right-clicking a Web page to open the shortcut menu, and then clicking View Source. To prevent users from viewing the HTML source of a Web page from the shortcut menu, set the "Turn off Shortcut Menu" policy, which disables the entire shortcut menu.

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO. ⓘ

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: View menu: Disable Source menu option
; State: Enabled
; Supported on: At least Internet Explorer 5.0

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions]
"NoViewSource"=dword:00000001
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: View menu: Disable Source menu option
# State: Enabled
# Supported on: At least Internet Explorer 5.0
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.

$path = 'HKCU:\Software\Policies\Microsoft\Internet Explorer\Restrictions'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'NoViewSource' -Value 1 -Type DWord

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview