en-US windows user

Scripts (Startup/Shutdown)

Verified with Windows 11 25H2 — updated on July 30, 2026

Windows 11 25H2

Supported on: At least Windows Server 2003 operating systems or Windows XP Professional

Path in the GPO console

User Configuration\Administrative Templates\Windows Components\Microsoft Management Console\Restricted/Permitted snap-ins\Group Policy\Resultant Set of Policy snap-in extensions

Description

This policy setting permits or prohibits the use of this snap-in. If you enable this policy setting, the snap-in is permitted and can be added into the Microsoft Management Console or run from the command line as a standalone console. If you disable this policy setting, the snap-in is prohibited and cannot be added into the Microsoft Management Console or run from the command line as a standalone console. An error message is displayed stating that policy is prohibiting the use of this snap-in. If this policy setting is not configured, the setting of the "Restrict users to the explicitly permitted list of snap-ins" setting determines whether this snap-in is permitted or prohibited. -- If the policy setting "Restrict users to the explicitly permitted list of snap-ins" is enabled, users cannot use any snap-in except those explicitly permitted. To explicitly permit use of this snap-in, enable this policy setting. If this policy setting is not configured or disabled, this snap-in is prohibited. -- If the policy setting "Restrict users to the explicitly permitted list of snap-ins" is disabled or not configured, users can use any snap-in except those explicitly prohibited. To explicitly prohibit use of this snap-in, disable this policy setting. If this policy setting is not configured or enabled, the snap-in is permitted. When a snap-in is prohibited, it does not appear in the Add/Remove Snap-in window in MMC. Also, when a user opens a console file that includes a prohibited snap-in, the console file opens, but the prohibited snap-in does not appear.

Registry

HKCU Software\Policies\Microsoft\MMC\{40B66660-4972-11d1-A7CA-0000F87571E3}

Value name: Restrict_Run

Enabled: Restrict_Run = 0

Disabled: Restrict_Run = 1

MDM / Intune (CSP)

./User/Vendor/MSFT/Policy/Config/ADMX_MMCSnapins/MMC_ScriptsMachine_2
User Since Windows 10, version 2004 with KB5005101 [10.0.19041.1202] and later | Windows 10, version 20H2 with KB5005101 [10.0.19042.1202] and later | Windows 10, version 21H1 with KB5005101 [10.0.19043.1202] and later | Windows 11, version 21H2 [10.0.22000] and later Official mapping (Microsoft Learn)

Microsoft Learn documentation Mapping data: Microsoft Learn (CC BY 4.0)

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: Scripts (Startup/Shutdown)
; State: Enabled
; Supported on: At least Windows Server 2003 operating systems or Windows XP Professional

[HKEY_CURRENT_USER\Software\Policies\Microsoft\MMC\{40B66660-4972-11d1-A7CA-0000F87571E3}]
"Restrict_Run"=dword:00000000
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Scripts (Startup/Shutdown)
# State: Enabled
# Supported on: At least Windows Server 2003 operating systems or Windows XP Professional
# 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\MMC\{40B66660-4972-11d1-A7CA-0000F87571E3}'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'Restrict_Run' -Value 0 -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