Create Virtual Directory Action



The Create Virtual Directory action allows you to add a new virtual directory to an existing IIS web site.




Server & Website


Specify the Server and Website to use via the Server Selection & Website Selection tabs, respectively.


Create under


Specify an existing IIS Virtual Directory to be the parent of the new directory. Click the 'Update list' button to download a list

of Virtual Directories from the specified IIS Server.





Specify the name by which you would like the new directory to be known.





Specify the local directory for the contents of the new virtual directory.



Create a pooled application...


Check this box if you would like to create a pooled web application running in the new virtual directory.



Permissions Tab




Set the permissions you want IIS users to have on the new Virtual Directory.



Script Events


The Create Virtual Directory object has an extra script event, named NewVirtualDirectory, which is called once the new virtual directory has been set up. It allows you to set properties which may not be available in the action, or perform more complicated operations on the new directory.




The NewIISWebDir parameter is an WMI settings object of type IIsWebVirtualDirSetting (see the MSDN Documentation.)


You can retrieve and set the virtual directory's properties directly using the syntax shown in the above example. See the MSDN Documentation for a full list of available properties. Unfortunately, code completion is not available on this object.


There is no need to call the .Put_() method to save any changes which are made (this is done automatically when the event completes.)