You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example registers your AzureStack environment with Azure, enables syndication and usage and gives a specific name to the resource group and registration resource.
@@ -208,7 +208,7 @@ The subscription Id that was previously used to register this Azure Stack enviro
208
208
209
209
The Azure tenant directory previously used to register this Azure Stack environment with Azure.
210
210
211
-
.PARAMETERJeaComputerName
211
+
.PARAMETERPrivilegedEndpoint
212
212
213
213
Just-Enough-Access Computer Name, also known as Emergency Console VM.(Example: AzS-ERCS01 for the ASDK).
214
214
@@ -228,7 +228,7 @@ The name of the Azure Environment where registration resources have been created
228
228
229
229
This example removes a registration resource in Azure that was created from a prior successful run of Add-AzsRegistration and uses defaults for RegistrationName and ResourceGroupName.
Log-Output "Azure Stack registration and activation completed successfully. Logs can be found at: $Global:AzureRegistrationLog and \\$JeaComputerName\c$\maslogs"
699
+
Log-Output "Azure Stack registration and activation completed successfully. Logs can be found at: $Global:AzureRegistrationLog and \\$PrivilegedEndpoint\c$\maslogs"
700
700
}
701
701
finally
702
702
{
@@ -855,12 +855,20 @@ function Connect-AzureAccount{
855
855
}
856
856
else
857
857
{
858
-
$token=$tokens[0]
858
+
$token=$tokens|
859
+
Where Resource -EQ$environment.ActiveDirectoryServiceEndpointResourceId|
860
+
Where { $_.TenantId-eq$subscription.TenantId } |
861
+
Where { $_.ExpiresOn-gt [datetime]::UtcNow } |
862
+
Select -First 1
859
863
}
860
864
}
861
865
else
862
866
{
863
-
$token=$tokens[0]
867
+
$token=$tokens|
868
+
Where Resource -EQ$environment.ActiveDirectoryServiceEndpointResourceId|
869
+
Where { $_.TenantId-eq$subscription.TenantId } |
870
+
Where { $_.ExpiresOn-gt [datetime]::UtcNow } |
871
+
Select -First 1
864
872
}
865
873
}
866
874
else
@@ -902,14 +910,14 @@ function Connect-AzureAccount{
902
910
903
911
.SYNOPSIS
904
912
905
-
Creates a powershell session with the JeaComputer for registration actions
913
+
Creates a powershell session with the PrivilegedEndpoint for registration actions
906
914
907
915
#>
908
916
functionInitialize-PrivilegedJeaSession{
909
917
[CmdletBinding()]
910
918
Param(
911
919
[Parameter(Mandatory=$true)]
912
-
[String] $JeaComputerName,
920
+
[String] $PrivilegedEndpoint,
913
921
914
922
[Parameter(Mandatory=$true)]
915
923
[PSCredential] $CloudAdminCredential
@@ -921,14 +929,14 @@ Param(
921
929
{
922
930
try
923
931
{
924
-
Log-Output "Initializing privileged JEA session with $JeaComputerName. Attempt $currentAttempt of $maxAttempts"
0 commit comments