Skip to content

Commit 36eff49

Browse files
author
BradleyBartlett
committed
allow for optional environment names in Remove-AzsRegistration
1 parent 7661d7e commit 36eff49

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Registration/RegisterWithAzure.psm1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,10 @@ Function Remove-AzsActivationResource{
989989
[String] $PrivilegedEndpoint,
990990

991991
[Parameter(Mandatory = $false)]
992-
[String] $AzureStackAdminSubscriptionId
992+
[String] $AzureStackAdminSubscriptionId,
993+
994+
[Parameter(Mandatory = $false)]
995+
[String] $AzureEnvironmentName = "AzureStack"
993996
)
994997

995998
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
@@ -1005,7 +1008,7 @@ Function Remove-AzsActivationResource{
10051008

10061009
$AzureStackStampInfo = Invoke-Command -Session $session -ScriptBlock { Get-AzureStackStampInformation }
10071010
Log-Output "Logging in to AzureStack administrator account. TenantId: $($AzureStackStampInfo.AADTenantID) Environment: 'AzureStack'"
1008-
Login-AzureRmAccount -TenantId $AzureStackStampInfo.AADTenantID -Environment 'AzureStack'
1011+
Login-AzureRmAccount -TenantId $AzureStackStampInfo.AADTenantID -Environment $AzureEnvironmentName
10091012
$azureStackContext = Get-AzureRmContext
10101013

10111014
$azureStackContextDetails = @{

0 commit comments

Comments
 (0)