Open Group Policy Management Console -

FileName = gpmcPath, UseShellExecute = true, Verb = IsAdmin() ? "" : "runas" // Request admin if not elevated ;

Open-GPMC -DomainFQDN "contoso.com" B. C# (for compiled tools) using System.Diagnostics; using System.Security.Principal; public static void OpenGroupPolicyManagementConsole(string domain = null) open group policy management console

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 FileName = gpmcPath, UseShellExecute = true, Verb =

if (!string.IsNullOrEmpty(domain)) psi.Arguments = $"/domain=domain"; FileName = gpmcPath

string gpmcPath = @"C:\Windows\System32\gpmc.msc";