Remove-AzFunctionApp

Deletes a function app.

Syntax

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

Description

Deletes a function app.

Examples

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

PS C:\> Get-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName | Remove-AzFunctionApp -Force

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

Example 2: Delete a function app by name.

PS C:\> Remove-AzFunctionApp -Name MyAppName -ResourceGroupName MyResourceGroupName -Force

This command deletes a function app by name.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-Force

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

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

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

Type:Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISite
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Name

The name of function app.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Returns true when the command succeeds.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName
Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SubscriptionId

The Azure subscription ID.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISite

Outputs

Boolean

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

INPUTOBJECT :

  • Location <String>: Resource Location.
  • CloningInfoSourceWebAppId <String>: ARM resource ID of the source app. App resource ID is of the form /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots.
  • [Kind <String>]: Kind of resource.
  • [Tag <IResourceTags>]: Resource tags.
    • [(Any) <String>]: This indicates any property can be added to this object.
  • [ClientAffinityEnabled <Boolean?>]: true to enable client affinity; false to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is true.
  • [ClientCertEnabled <Boolean?>]: true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false.
  • [ClientCertExclusionPath <String>]: client certificate authentication comma-separated exclusion paths
  • [CloningInfoAppSettingsOverride <ICloningInfoAppSettingsOverrides>]: Application setting overrides for cloned app. If specified, these settings override the settings cloned from source app. Otherwise, application settings from source app are retained.
    • [(Any) <String>]: This indicates any property can be added to this object.
  • [CloningInfoCloneCustomHostName <Boolean?>]: true to clone custom hostnames from source app; otherwise, false.
  • [CloningInfoCloneSourceControl <Boolean?>]: true to clone source control from source app; otherwise, false.
  • [CloningInfoConfigureLoadBalancing <Boolean?>]: true to configure load balancing for source and destination app.
  • [CloningInfoCorrelationId <String>]: Correlation ID of cloning operation. This ID ties multiple cloning operations together to use the same snapshot.
  • [CloningInfoHostingEnvironment <String>]: App Service Environment.
  • [CloningInfoOverwrite <Boolean?>]: true to overwrite destination app; otherwise, false.
  • [CloningInfoSourceWebAppLocation <String>]: Location of source app ex: West US or North Europe
  • [CloningInfoTrafficManagerProfileId <String>]: ARM resource ID of the Traffic Manager profile to use, if it exists. Traffic Manager resource ID is of the form /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}.
  • [CloningInfoTrafficManagerProfileName <String>]: Name of Traffic Manager profile to create. This is only needed if Traffic Manager profile does not already exist.
  • [Config <ISiteConfig>]: Configuration of the app.
    • IsPushEnabled <Boolean>: Gets or sets a flag indicating whether the Push endpoint is enabled.
    • [ActionMinProcessExecutionTime <String>]: Minimum time the process must execute before taking the action
    • [ActionType <AutoHealActionType?>]: Predefined action to be taken.
    • [AlwaysOn <Boolean?>]: true if Always On is enabled; otherwise, false.
    • [ApiDefinitionUrl <String>]: The URL of the API definition.
    • [ApiManagementConfigId <String>]: APIM-Api Identifier.
    • [AppCommandLine <String>]: App command line to launch.
    • [AppSetting <INameValuePair[]>]: Application settings.
      • [Name <String>]: Pair name.
      • [Value <String>]: Pair value.
    • [AutoHealEnabled <Boolean?>]: true if Auto Heal is enabled; otherwise, false.
    • [AutoSwapSlotName <String>]: Auto-swap slot name.
    • [ConnectionString <IConnStringInfo[]>]: Connection strings.
      • [ConnectionString <String>]: Connection string value.
      • [Name <String>]: Name of connection string.
      • [Type <ConnectionStringType?>]: Type of database.
    • [CorAllowedOrigin <String[]>]: Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all.
    • [CorSupportCredentials <Boolean?>]: Gets or sets whether CORS requests with credentials are allowed. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials for more details.
    • [CustomActionExe <String>]: Executable to be run.
    • [CustomActionParameter <String>]: Parameters for the executable.
    • [DefaultDocument <String[]>]: Default documents.
    • [DetailedErrorLoggingEnabled <Boolean?>]: true if detailed error logging is enabled; otherwise, false.
    • [DocumentRoot <String>]: Document root.
    • [DynamicTagsJson <String>]: Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint.
    • [ExperimentRampUpRule <IRampUpRule[]>]: List of ramp-up rules.
      • [ActionHostName <String>]: Hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net.
      • [ChangeDecisionCallbackUrl <String>]: Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts. https://www.siteextensions.net/packages/TiPCallback/
      • [ChangeIntervalInMinute <Int32?>]: Specifies interval in minutes to reevaluate ReroutePercentage.
      • [ChangeStep <Double?>]: In auto ramp up scenario this is the step to add/remove from ReroutePercentage until it reaches \nMinReroutePercentage or MaxReroutePercentage. Site metrics are checked every N minutes specified in ChangeIntervalInMinutes.\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in ChangeDecisionCallbackUrl.
      • [MaxReroutePercentage <Double?>]: Specifies upper boundary below which ReroutePercentage will stay.
      • [MinReroutePercentage <Double?>]: Specifies lower boundary above which ReroutePercentage will stay.
      • [Name <String>]: Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment.
      • [ReroutePercentage <Double?>]: Percentage of the traffic which will be redirected to ActionHostName.
    • [FtpsState <FtpsState?>]: State of FTP / FTPS service
    • [HandlerMapping <IHandlerMapping[]>]: Handler mappings.
      • [Argument <String>]: Command-line arguments to be passed to the script processor.
      • [Extension <String>]: Requests with this extension will be handled using the specified FastCGI application.
      • [ScriptProcessor <String>]: The absolute path to the FastCGI application.
    • [HealthCheckPath <String>]: Health check path
    • [Http20Enabled <Boolean?>]: Http20Enabled: configures a web site to allow clients to connect over http2.0
    • [HttpLoggingEnabled <Boolean?>]: true if HTTP logging is enabled; otherwise, false.
    • [IPSecurityRestriction <IIPSecurityRestriction[]>]: IP security restrictions for main.
      • [Action <String>]: Allow or Deny access for this IP range.
      • [Description <String>]: IP restriction rule description.
      • [IPAddress <String>]: IP address the security restriction is valid for. It can be in form of pure ipv4 address (required SubnetMask property) or CIDR notation such as ipv4/mask (leading bit match). For CIDR, SubnetMask property must not be specified.
      • [Name <String>]: IP restriction rule name.
      • [Priority <Int32?>]: Priority of IP restriction rule.
      • [SubnetMask <String>]: Subnet mask for the range of IP addresses the restriction is valid for.
      • [SubnetTrafficTag <Int32?>]: (internal) Subnet traffic tag
      • [Tag <IPFilterTag?>]: Defines what this IP filter will be used for. This is to support IP filtering on proxies.
      • [VnetSubnetResourceId <String>]: Virtual network resource id
      • [VnetTrafficTag <Int32?>]: (internal) Vnet traffic tag
    • [JavaContainer <String>]: Java container.
    • [JavaContainerVersion <String>]: Java container version.
    • [JavaVersion <String>]: Java version.
    • [LimitMaxDiskSizeInMb <Int64?>]: Maximum allowed disk size usage in MB.
    • [LimitMaxMemoryInMb <Int64?>]: Maximum allowed memory usage in MB.
    • [LimitMaxPercentageCpu <Double?>]: Maximum allowed CPU usage percentage.
    • [LinuxFxVersion <String>]: Linux App Framework and version
    • [LoadBalancing <SiteLoadBalancing?>]: Site load balancing.
    • [LocalMySqlEnabled <Boolean?>]: true to enable local MySQL; otherwise, false.
    • [LogsDirectorySizeLimit <Int32?>]: HTTP logs directory size limit.
    • [MachineKeyDecryption <String>]: Algorithm used for decryption.
    • [MachineKeyDecryptionKey <String>]: Decryption key.
    • [MachineKeyValidation <String>]: MachineKey validation.
    • [MachineKeyValidationKey <String>]: Validation key.
    • [ManagedPipelineMode <ManagedPipelineMode?>]: Managed pipeline mode.
    • [ManagedServiceIdentityId <Int32?>]: Managed Service Identity Id
    • [MinTlsVersion <SupportedTlsVersions?>]: MinTlsVersion: configures the minimum version of TLS required for SSL requests
    • [NetFrameworkVersion <String>]: .NET Framework version.
    • [NodeVersion <String>]: Version of Node.js.
    • [NumberOfWorker <Int32?>]: Number of workers.
    • [PhpVersion <String>]: Version of PHP.
    • [PowerShellVersion <String>]: Version of PowerShell.
    • [PreWarmedInstanceCount <Int32?>]: Number of preWarmed instances. This setting only applies to the Consumption and Elastic Plans
    • [PublishingUsername <String>]: Publishing user name.
    • [PushKind <String>]: Kind of resource.
    • [PythonVersion <String>]: Version of Python.
    • [RemoteDebuggingEnabled <Boolean?>]: true if remote debugging is enabled; otherwise, false.
    • [RemoteDebuggingVersion <String>]: Remote debugging version.
    • [RequestCount <Int32?>]: Request Count.
    • [RequestTimeInterval <String>]: Time interval.
    • [RequestTracingEnabled <Boolean?>]: true if request tracing is enabled; otherwise, false.
    • [RequestTracingExpirationTime <DateTime?>]: Request tracing expiration time.
    • [ScmIPSecurityRestriction <IIPSecurityRestriction[]>]: IP security restrictions for scm.
    • [ScmIPSecurityRestrictionsUseMain <Boolean?>]: IP security restrictions for scm to use main.
    • [ScmType <ScmType?>]: SCM type.
    • [SlowRequestCount <Int32?>]: Request Count.
    • [SlowRequestTimeInterval <String>]: Time interval.
    • [SlowRequestTimeTaken <String>]: Time taken.
    • [TagWhitelistJson <String>]: Gets or sets a JSON string containing a list of tags that are whitelisted for use by the push registration endpoint.
    • [TagsRequiringAuth <String>]: Gets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration endpoint. Tags can consist of alphanumeric characters and the following: '_', '@', '#', '.', ':', '-'. Validation should be performed at the PushRequestHandler.
    • [TracingOption <String>]: Tracing options.
    • [TriggerPrivateBytesInKb <Int32?>]: A rule based on private bytes.
    • [TriggerStatusCode <IStatusCodesBasedTrigger[]>]: A rule based on status codes.
      • [Count <Int32?>]: Request Count.
      • [Status <Int32?>]: HTTP status code.
      • [SubStatus <Int32?>]: Request Sub Status.
      • [TimeInterval <String>]: Time interval.
      • [Win32Status <Int32?>]: Win32 error code.
    • [Use32BitWorkerProcess <Boolean?>]: true to use 32-bit worker process; otherwise, false.
    • [VirtualApplication <IVirtualApplication[]>]: Virtual applications.
      • [PhysicalPath <String>]: Physical path.
      • [PreloadEnabled <Boolean?>]: true if preloading is enabled; otherwise, false.
      • [VirtualDirectory <IVirtualDirectory[]>]: Virtual directories for virtual application.
        • [PhysicalPath <String>]: Physical path.
        • [VirtualPath <String>]: Path to virtual application.
      • [VirtualPath <String>]: Virtual path.
    • [VnetName <String>]: Virtual Network name.
    • [WebSocketsEnabled <Boolean?>]: true if WebSocket is enabled; otherwise, false.
    • [WindowsFxVersion <String>]: Xenon App Framework and version
    • [XManagedServiceIdentityId <Int32?>]: Explicit Managed Service Identity Id
  • [ContainerSize <Int32?>]: Size of the function container.
  • [DailyMemoryTimeQuota <Int32?>]: Maximum allowed daily memory-time quota (applicable on dynamic apps only).
  • [Enabled <Boolean?>]: true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline).
  • [HostNameSslState <IHostNameSslState[]>]: Hostname SSL states are used to manage the SSL bindings for app's hostnames.
    • [HostType <HostType?>]: Indicates whether the hostname is a standard or repository hostname.
    • [Name <String>]: Hostname.
    • [SslState <SslState?>]: SSL type.
    • [Thumbprint <String>]: SSL certificate thumbprint.
    • [ToUpdate <Boolean?>]: Set to true to update existing hostname.
    • [VirtualIP <String>]: Virtual IP address assigned to the hostname if IP based SSL is enabled.
  • [HostNamesDisabled <Boolean?>]: true to disable the public hostnames of the app; otherwise, false. If true, the app is only accessible via API management process.
  • [HostingEnvironmentProfileId <String>]: Resource ID of the App Service Environment.
  • [HttpsOnly <Boolean?>]: HttpsOnly: configures a web site to accept only https requests. Issues redirect for http requests
  • [HyperV <Boolean?>]: Hyper-V sandbox.
  • [IdentityType <ManagedServiceIdentityType?>]: Type of managed service identity.
  • [IdentityUserAssignedIdentity <IManagedServiceIdentityUserAssignedIdentities>]: The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}
    • [(Any) <IComponents1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties>]: This indicates any property can be added to this object.
  • [IsXenon <Boolean?>]: Obsolete: Hyper-V sandbox.
  • [RedundancyMode <RedundancyMode?>]: Site redundancy mode
  • [Reserved <Boolean?>]: true if reserved; otherwise, false.
  • [ScmSiteAlsoStopped <Boolean?>]: true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false.
  • [ServerFarmId <String>]: Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".