Last active
June 20, 2023 23:42
-
-
Save mavaddat/88f109f3883877e3250b6be94519daf2 to your computer and use it in GitHub Desktop.
Suite of PowerShell commands to enable all MMC Snapins on Windows (requires admin UAC)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -RunAsAdministrator | |
Get-ChildItem -Path 'HKCU:\SOFTWARE\Policies\Microsoft\MMC\' | ForEach-Object { Set-ItemProperty -Path $_.PSPath -Name Restrict_Run -Value 1 # Disable is 1 (1 means allow the MMC) | |
} | |
Set-ItemProperty -Path HKCU:\Software\Policies\Microsoft\MMC\ -Name RestrictAuthorMode -Value 0 | |
Set-ItemProperty -Path HKCU:\Software\Policies\Microsoft\MMC\ -Name RestrictToPermittedSnapins -Value 0 | |
if(Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun){ | |
Remove-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun | |
} | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name DisableRegistryTools -Value 0 -Force | |
Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\System\ -Name AllowDomainPINLogon -Value 1 -Type DWord | |
if(-not (Test-Path -Path HKLM:\Software\Policies\Microsoft\PassportForWork)){ | |
New-Item -Path HKLM:\Software\Policies\Microsoft\ -Name PassportForWork | |
} | |
Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\PassportForWork -Name Enabled -Value 1 -Type DWord | |
Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\PassportForWork -Name DisablePostLogonProvisioning -Value 1 -Type DWord |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment