Gets an IIS application as an Application
object.
Get-IisApplication [-SiteName] <String> [[-VirtualPath] <String>] [<CommonParameters>]
Uses the Microsoft.Web.Administration
API to get an IIS application object. If the application doesn't exist, $null
is returned.
The objects returned have two dynamic properties and one dynamic methods added.
ServerManager { get; }
- The ServerManager
object which created the Application
object.CommitChanges()
- Persists any configuration changes made to the object back into IIS's configuration files.PhysicalPath { get; }
- The physical path to the application.Beginning with Carbon 2.0.1, this function is available only if IIS is installed.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
SiteName | String | The site where the application is running. |
true | false | |
VirtualPath | String | The name of the application. Default is to return all applications running under the website |
false | false |
Get-IisApplication -SiteName 'DeathStar`
Gets all the applications running under the DeathStar
website.
Get-IisApplication -SiteName 'DeathStar' -VirtualPath '/'
Demonstrates how to get the main application for a website: use /
as the application name.
Get-IisApplication -SiteName 'DeathStar' -VirtualPath 'MainPort/ExhaustPort'
Demonstrates how to get a nested application, i.e. gets the application at /MainPort/ExhaustPort
under the DeathStar
website.