Open Group Policy Management Console [extra Quality] (2024)
Process.Start(psi);
string gpmcPath = @"C:\Windows\System32\gpmc.msc"; open group policy management console
private void btnOpenGPMC_Click(object sender, EventArgs e) Process
if (!System.IO.File.Exists(gpmcPath)) throw new Exception("GPMC not installed. Install RSAT."); string gpmcPath = @"C:\Windows\System32\gpmc.msc"
Open-GPMC -DomainFQDN "contoso.com" B. C# (for compiled tools) using System.Diagnostics; using System.Security.Principal; public static void OpenGroupPolicyManagementConsole(string domain = null)
var psi = new ProcessStartInfo
# Launch GPMC if ($DomainFQDN) Start-Process $gpmcPath -ArgumentList "/domain=$DomainFQDN" elseif ($GPOId) Start-Process $gpmcPath -ArgumentList "/gpo:$GPOId" else Start-Process $gpmcPath