User-44640224 posted
I figured it out. I created a console app with the follow:
ServerManager mgr1 = new ServerManager();
//Assign to Application
Site defaultSite = mgr1.Sites["Default Web Site"];
Application VDir = defaultSite.Applications["/VirtDir"];
VDir.ApplicationPoolName = "NameOfAppPool";
// Commit the changes
mgr1.CommitChanges();
I then added a Custom Action Class to execute the console app.