private void TryFindAppPool(ManagementScope scope, string name) { var service = new IisService("localhost"); IisAppPool appPool = service.FindAppPoolByName(name); Console.WriteLine("found app pool: " + (appPool != null)); }
public void SetAppPoolIdentity() { IisService service = new IisService("localhost"); IisAppPool appPool = service.FindAppPoolByName("GiP"); appPool.Identity = new Iis6AppPoolIdentity { IdentityType = Iis6AppPoolIdentityType.NetworkService }; }
public void SetAppPoolIdentity() { IisService service = new IisService("localhost"); IisAppPool appPool = service.FindAppPoolByName("GiP"); appPool.Identity = new Iis6AppPoolIdentity {IdentityType = Iis6AppPoolIdentityType.NetworkService}; }