Export (0) Print
Expand All
Expand Minimize

Stop-ASApplication

Stop-ASApplication

Prevents an application from accepting any messages and from being automatically started (if application auto-start was enabled). When stopping an application, Stop-ASApplication disables all application protocols (disabling the message flow) of an application by copying all the contents of the "enabledProtocols" attribute to the "previouslyEnabledProtocols" attribute (always overwriting its contents) in the \configuration\system.applicationHost\sites\site\application element in the applicationHost.config file for a particular virtual application. The cmdlet then clears the contents of the "enabledProtocols" attribute. This cmdlet can only be executed when enabledProtocols is not empty. Disables auto-start for the applications. Stop-ASApplication also sets the serviceAutoStartEnabled property in the virtual application configuration in the applicationHost.config file to “false”.

Syntax

Parameter Set: SiteNameAndVirtualPath
Stop-ASApplication [-SiteName] <String> [[-VirtualPath] <String> ] [ <CommonParameters>]


Parameters

-ApplicationObject<ApplicationInfo>

Identifies the application to be stopped.


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 stopped. To the SiteName parameter, you can add the VirtualPath parameter that identifies a specific application within the Web site to be stopped. If Virtual Path is not added to SiteName, all applications within the site will be stopped. 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?

-Uri<Uri>

A URI for a site or an application, indicating one or more applications to be stopped. If the URI is for a site, all applications in that site will be stopped. If the URI is for an application, only that application will be stopped. 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 stopped. 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?

<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

Stops the myApp application in the Default Web Site.


Stop-ASApplication -SiteName “Default Web Site” -VirtualPath “/myApp”

EXAMPLE 2

Stops all applications in the Default Web Site.


Stop-ASApplication -SiteName “Default Web Site”
Show:
© 2015 Microsoft