HI i created some virtual directories in my iis using following code
Function InputBox ($message, $title, $default)
{
[void][reflection.assembly]::loadwithpartialname("microsoft.visualbasic")
$result = [microsoft.visualbasic.interaction]::InputBox($message,$title, $default)
return $result
}
$server=inputbox("enter the name of the server")
$iis=[adsi]"IIS://$($server)/W3SVC/1/Root"
$vdirname=inputbox("enter the name of virtual directory","","")
$vd = $iis.psbase.children.Add($vdirname,"IISWebVirtualDir")
$vdirpath=inputbox("enter the physical location of the application")
$vd.put("Path",$vdirpath)
$vd.psbase.CommitChanges()
but i am unable to create it as an application can any one help me out in this issue. for creating it as an application i am going into the properties of the virtual directory and in the virtual derctory tab in the application sessions, i clicked on "create" button and then application got created.
can any one help me with a powershell code that will create an application Thanks, Ramuk Navap