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 default application...


Check this box to create a default application in the new virtual directory. Check "create a Pooled application" to create a pooled application.



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 ADSI container object is of type IIsWebVirtualDir (see the MSDN Documentation for details.) You will need to use the .Get() and .Put() methods to retrieve and set properties on the object. See the MSDN documentation for a full list of property names.


It is not necessary to call the .SetInfo() method to save any changes, this is called for you when the event exits.