可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How do I set group policies in AD? I'm able to create my OU but i also need to attach group policy linking to it. So this is what i have so far. string strOU = "OU=test454545,OU=Clients,OU=Clients,DC=domain,DC=net"; GPMGMTLib.GPM gpm = new GPMGMTLib.GPM(); GPMGMTLib.GPMConstants gpc = gpm.GetConstants(); GPMGMTLib.GPMDomain gpd = gpm.GetDomain(Environment.GetEnvironmentVariable("USERDNSDOMAIN"), "", gpc.UseAnyDC); GPMGMTLib.GPMSOM gpSom = gpd.GetSOM(strOU); GPMGMTLib.GPMGPO gpo = gpd.CreateGPO(); gpo.DisplayName = "TestOutCome"; gpSom