Edit

Share via


Stop-AzWebApp

Stops an Azure Web App.

Syntax

S1

Stop-AzWebApp
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

S2

Stop-AzWebApp
    [-WebApp] <PSSite>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Stop-AzWebApp cmdlet stops an Azure Web App.

Examples

Example 1: Stop a Web App

Stop-AzWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp"

This command stops the Web App named ContosoWebApp that belongs to the resource group named Default-Web-WestUS.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

WebApp Name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

S1
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceGroupName

Resource Group Name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

S1
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WebApp

WebApp Object

Parameter properties

Type:PSSite
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

S2
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

PSSite

Outputs

PSSite