Share via


Remove-AzureSubscription

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Remove-AzureSubscription

Removes the settings for a Azure subscription from the subscription data file.

Syntax

Parameter Set: Default
Remove-AzureSubscription [-SubscriptionName] <String> [[-SubscriptionDataFile] <String> ] [[-Force]] [[-PassThru]] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version.

The Remove-AzureSubscription cmdlet removes all the settings associated with the specified subscription from a subscription data file.

Parameters

-Force

If enabled, removes the subscription without prompting for confirmation.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SubscriptionDataFile<String>

Specifies the path and file name of a subscription data file. This parameter is optional. If it is not provided, the subscription data is removed from the default subscription data file in the user's profile.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SubscriptionName<String>

Specifies the name of the subscription for which all data will be removed from the subscription data file.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1

This command removes the data for the subscription named "Test" in the default subscription data file.

C:\PS> Remove-AzureSubscription "Test"

Example 2

This command removes the data for the subscription named "Test" from the specified subscription data file.

C:\PS> Remove-AzureSubscription "Test" -SubscriptionDataFile "C:\Subs\MySubscriptions.xml"

Get-AzureSubscription

Select-AzureSubscription

Set-AzureSubscription

Import-AzurePublishSettingsFile

Get Started with Azure Cmdlets