Install-IisApplication

Creates a new application under a website.

Syntax

Install-IisApplication [-SiteName] <String> [-VirtualPath] <String> [-PhysicalPath] <String> [[-AppPoolName] <String>] [<CommonParameters>]

Description

Creates a new application at VirtualPath under website SiteName running the code found on the file system under PhysicalPath, i.e. if SiteName is is example.com, the application is accessible at example.com/VirtualPath. If an application already exists at that path, it is removed first. The application can run under a custom application pool using the optional AppPoolName parameter. If no app pool is specified, the application runs under the same app pool as the website it runs under.

Parameters

Name Type Description Required? Pipeline Input Default Value
SiteName String The site where the application should be created. true false
VirtualPath String The name of the application. true false
PhysicalPath String The path to the application. true false
AppPoolName String The app pool for the application. false false

EXAMPLE 1

Install-IisApplication -SiteName Peanuts -VirtualPath CharlieBrown -PhysicalPath C:\Path\To\CharlieBrown -AppPoolName CharlieBrownPool

Creates an application at Peanuts/CharlieBrown which runs from Path/To/CharlieBrown. The application runs under the CharlieBrownPool.

EXAMPLE 2

Install-IisApplication -SiteName Peanuts -VirtualPath Snoopy -PhysicalPath C:\Path\To\Snoopy

Create an application at Peanuts/Snoopy, which runs from C:\Path\To\Snoopy. It uses the same application as the Peanuts website.