Start-ASApplication
Start-ASApplication
Enables an application to accept messages and to be automatically started (if application auto-start was enabled). Start-ASApplication re-enables application protocols in the applicationHost.config file by copying the contents of “previouslyEnabledProtocols” into “enabledProtocols”, and then removing the "previouslyEnabledProtocols" attribute. The cmdlet will issue a log message if "previouslyEnabledProtocols" attribute is empty and “enabledProtocols” is not empty. Start-ASApplication sets the “serviceAutoStartEnabled” attribute in the applicationHost.config file to “True” if the application’s “serviceAutoStartMode” attribute in the applicationHost.config file is set to “All” or “Custom”.
Syntax
Parameter Set: SiteNameAndVirtualPath
Start-ASApplication [-SiteName] <String> [[-VirtualPath] <String> ] [-StartApplicationPool] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameters
-ApplicationObject<ApplicationInfo>
Identifies the application to be started.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
-SiteName<String>
The name of a Web site, as defined in the IIS Connections pane, which specifies that the one or more applications within the site will be started. To the SiteName parameter, you can add the VirtualPath parameter that identifies a specific application within the Web site to be started. If Virtual Path is not added to SiteName, all applications within the site will be started. If you use the SiteName parameter, do not use the Uri parameter.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
-StartApplicationPool
If this flag is present, the cmdlet starts the application pool if it is not running. For this to happen, the startMode of the application’s appPool must be set to “AlwaysRunning”. For more information, seeT:Microsoft.ApplicationServer.Management.Commands.Set-ASApplication.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
-Uri<Uri>
A URI for a site or an application, indicating one or more applications to be started. If the URI is for a site, all applications in that site will be started. If the URI is for an application, only that application will be started. If you use the Uri parameter, do not use the SiteName and VirtualPath parameter set.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
-VirtualPath<String>
The virtual path for an application, as defined in the IIS Manager Connections pane, which specifies the application to be started. You must add the VirtualPath parameter to the SiteName parameter, using SiteName to identify the site that the application is included in. The leading "/" character in the virtual path is optional. The virtual path includes the name of the application, as defined in IIS. If you use the SiteName and VirtualName parameter set, do not use the Uri parameter.
Aliases |
none |
Required? |
false |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
-Confirm
Prompts you for confirmation before executing the command.
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- None
Outputs
The output type is the type of the objects that the cmdlet emits.
- None
Examples
EXAMPLE 1
Starts the myApp application in the Default Web Site.
Start-ASApplication -SiteName “Default Web Site” -VirtualPath “/myApp”
EXAMPLE 2
Starts all applications in the Default Web Site.
Start-ASApplication -SiteName “Default Web Site”