Editar

Compartir a través de


Restart-AzFunctionApp

Restarts a function app.

Syntax

Restart-AzFunctionApp
       -Name <String>
       -ResourceGroupName <String>
       [-SubscriptionId <String>]
       [-Force]
       [-DefaultProfile <PSObject>]
       [-PassThru]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Restart-AzFunctionApp
       [-Force]
       -InputObject <ISite>
       [-DefaultProfile <PSObject>]
       [-PassThru]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

Restarts a function app.

Examples

Example 1: Get a function app by name and restart it.

Get-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName | Restart-AzFunctionApp -Force

This command gets a function app by name and restarts it.

Example 2: Restart a function app by name.

Restart-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName -Force

This command restarts a function app by name.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the cmdlet to restart the function app without prompting for confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:ISite
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The name of function app.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Returns true when the command succeeds.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The Azure subscription ID.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

ISite

Outputs

Boolean