Skip to content

Commit d7d12ba

Browse files
committed
remove extra AzureEnvironmentName parameter, update function description
1 parent 128852c commit d7d12ba

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Registration/RegisterWithAzure.psm1

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -970,12 +970,11 @@ param(
970970
<#
971971
.SYNOPSIS
972972
973-
Removes the activation resource created during New-AzsActivationResource
973+
De-activates Azure Stack in Disconnected Environments
974974
975975
.DESCRIPTION
976976
977-
Prompts the user to log in to the Azure Stack Administrator account, finds and removes the activation resource created
978-
during New-AzsActivationResource. This will remove any downloaded marketplace products.
977+
Takes Azure Stack PrivilegedEndpoint and PrivilegedEndpoint credential as input, and deactivates the activation properties created by New-AzsActivationResource
979978
980979
#>
981980
Function Remove-AzsActivationResource{
@@ -985,10 +984,7 @@ Function Remove-AzsActivationResource{
985984
[PSCredential] $PrivilegedEndpointCredential,
986985

987986
[Parameter(Mandatory = $true)]
988-
[String] $PrivilegedEndpoint,
989-
990-
[Parameter(Mandatory = $false)]
991-
[String] $AzureEnvironmentName = "AzureStack"
987+
[String] $PrivilegedEndpoint
992988
)
993989

994990
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
@@ -1002,7 +998,8 @@ Function Remove-AzsActivationResource{
1002998
{
1003999
$session = Initialize-PrivilegedEndpointSession -PrivilegedEndpoint $PrivilegedEndpoint -PrivilegedEndpointCredential $PrivilegedEndpointCredential -Verbose
10041000
Log-Output "Successfully initialized session with endpoint: $PrivilegedEndpoint"
1005-
$activation = Invoke-Command -Session $session -ScriptBlock { Remove-AzureStackActivation }
1001+
Log-Output "De-Activating Azure Stack (this may take up to 10 minutes to complete)."
1002+
Invoke-Command -Session $session -ScriptBlock { Remove-AzureStackActivation }
10061003
}
10071004
catch
10081005
{
@@ -1016,7 +1013,7 @@ Function Remove-AzsActivationResource{
10161013
}
10171014
}
10181015

1019-
Log-Output "Activation resource has been removed from Azure Stack."
1016+
Log-Output "Successfully de-activated Azure Stack"
10201017
Log-Output "*********************** End log: $($PSCmdlet.MyInvocation.MyCommand.Name) ***********************`r`n`r`n"
10211018
}
10221019

0 commit comments

Comments
 (0)