Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Remove-AzureEnvironment

Remove-AzureEnvironment

microsoft.windowsazure.commands.profile.dll, microsoft.windowsazure.commands.dll

Synopsis

Deletes an Azure environment from Windows PowerShell

Syntax

Remove-AzureEnvironment [-Name] [-Force] [-SubscriptionDataFile] [<CommonParameters>]

Detailed Description

The Remove-AzureEnvironment cmdlet deletes an Azure environment from your roaming profile so Windows PowerShell can't find it. This cmdlet does not delete the environment from Microsoft Azure, or change the actual environment in any way.An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx).

Parameters

-Name <String>

Specifies the name of the environment to remove. This parameter is required. This parameter value is case-sensitive. Wildcard characters are not permitted.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Force <SwitchParameter>

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-SubscriptionDataFile <String>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PassThru <string>

Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output.

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

None

Return Type

None or System.Boolean

Notes

Examples

-------------------------- Example 1: Delete an environment --------------------------

This command deletes the ContosoEnv environment from Windows PowerShell.

PS C:\>Remove-AzureEnvironment -Name ContosoEnv

-------------------------- Example 2: Delete multiple environments --------------------------

This command deletes environments whose names begin with "Contoso" from Windows PowerShell.

PS C:\>Get-AzureEnvironment | Where-Object EnvironmentName -like "Contoso*" | ForEach-Object {Remove-AzureEnvironment -Name $_.EnvironmentName }

Online Version
Add-AzureEnvironment
Get-AzureEnvironment
Set-AzureEnvironment