/// <summary> /// Create a new application pool on the IIS instance /// </summary> /// <param name="name">The name of the application pool.</param> /// <returns></returns> public ApplicationPool CreateAppliationPool(string name) { ApplicationPool appPool = new ApplicationPool(this.Scope); appPool.Name = string.Format("W3SVC/AppPools/{0}", name); ManagementObject poolTemplate = CreateManagementObject("IIsApplicationPoolSetting"); poolTemplate.Properties["Name"].Value = appPool.Name; poolTemplate.Put(); return appPool; }