< Back

Remove-AzureEnvironment

Wed Jan 30, 2019 5:41 pm

NAME Remove-AzureEnvironment



SYNOPSIS

Deletes an Azure environment from Windows PowerShell





SYNTAX

Remove-AzureEnvironment [-Name] <String> [[-PassThru] <String>] [<CommonParameters>]





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-c ... fault.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.



Required? true

Position? 1

Default value

Accept pipeline input? True (ByPropertyName)

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.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None



You can pipe input to this cmdlet by property name, but not by value.





OUTPUTS

None or System.Boolean



If you use the PassThru parameter, this cmdlet returns a Boolean value. Otherwise, it does not return any output.





NOTES





Keywords: azure, azuresm, servicemanagement, management, service, utilities



Example 1: Delete an environment



PS C:\\>Remove-AzureEnvironment -Name ContosoEnv



This command deletes the ContosoEnv environment from Windows PowerShell.

Example 2: Delete multiple environments



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



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



RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=397626

Add-AzureEnvironment

Get-AzureEnvironment

Set-AzureEnvironment