Skip to content

Commit 8dc66a3

Browse files
author
BradleyBartlett
committed
udated script synopsis, documentation, and examples
1 parent eb33673 commit 8dc66a3

File tree

1 file changed

+34
-15
lines changed

1 file changed

+34
-15
lines changed

Registration/RegisterWithAzure.ps1

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,35 @@
66
.SYNOPSIS
77
88
This script can be used to register Azure Stack POC with Azure. To run this script, you must have a public Azure subscription of any type.
9-
There must also be an account that is an owner or contributor of the subscription.
9+
There must also be an account that is an owner or contributor of the subscription, and you must have registered the AzureStack resource provider
1010
1111
.DESCRIPTION
1212
13-
RegisterToAzure runs local scripts to connect your Azure Stack to Azure. After connecting with Azure, you can test marketplace syndication.
13+
RegisterWithAzure runs scripts already present in Azure Stack (path: $root\CloudDeployment\Setup\Activation\Bridge)to connect your Azure Stack to Azure.
14+
After connecting with Azure, you can test marketplace syndication by downloading products from the marketplace. Usage data will also default to being reported to Azure for billing purposes.
15+
To turn these features off see examples below.
1416
1517
The script will follow four steps:
16-
Configure bridge identity: configures Azure Stack so that it can call to Azure via your Azure subscription
17-
Get registration request: get Azure Stack environment information to create a registration for this azure stack in azure
18+
Configure bridge identity: Creates Azure AD application that is used by Azure Bridge for marketplace syndication and by Usage Bridge to send Usage records (if configured).
19+
Get registration request: get Azure Stack environment information to create a registration for this Azure Stack in azure
1820
Register with Azure: uses Azure powershell to create an "Azure Stack Registration" resource on your Azure subscription
1921
Activate Azure Stack: final step in connecting Azure Stack to be able to call out to Azure
2022
21-
.PARAMETER azureSubscriptionId
22-
23-
24-
Azure subscription ID that you want to register your Azure Stack with. This parameter is mandatory.
25-
26-
.PARAMETER azureDirectoryTenantName
23+
.PARAMETER azureCredential
2724
28-
Name of your AAD Tenant which your Azure subscription is a part of. This parameter is mandatory.
25+
Powershell object that contains credential information such as user name and password. If not supplied script will request login via gui
2926
3027
.PARAMETER azureAccountId
3128
3229
Username for an owner/contributor of the azure subscription. This user must not be an MSA or 2FA account. This parameter is mandatory.
3330
34-
.PARAMETER azureCredential
31+
.PARAMETER azureSubscriptionId
3532
36-
Powershell object that contains credential information such as user name and password. If not supplied script will request login via gui
33+
Azure subscription ID that you want to register your Azure Stack with. This parameter is mandatory.
34+
35+
.PARAMETER azureDirectoryTenantName
36+
37+
Name of your AAD Tenant which your Azure subscription is a part of. This parameter is mandatory.
3738
3839
.PARAMETER azureEnvironment
3940
@@ -43,16 +44,34 @@ Environment name for use in retrieving tenant details and running several of the
4344
4445
URI used for ActivateBridge.ps1 that refers to the endpoint for Azure Resource Manager. Defaults to "https://management.azure.com"
4546
47+
.PARAMETER enableSyndication
48+
49+
Boolean value used in Register-AzureStack.ps1 to enable marketplace syndication. Defaults to $true
50+
51+
.PARAMETER reportUsage
52+
53+
Boolean value used in Register-AzureStack.ps1 to enable reporting of usage records to Azure. Defaults to $true
54+
4655
.EXAMPLE
4756
57+
This example registers your AzureStack account with Azure, enables syndication, and enables usage reporting to Azure.
4858
This script must be run from the Host machine of the POC.
49-
.\RegisterWithAzure.ps1 -azureSubscriptionId "5e0ae55d-0b7a-47a3-afbc-8b372650abd3" -azureDirectoryTenantName "contoso.onmicrosoft.com" -azureAccountId "[email protected]"
5059
60+
.\RegisterWithAzure.ps1 -azureCredential $yourCredentials -azureSubscriptionId $subsciptionId -azureDirectoryTenantName "contoso.onmicrosoft.com" -azureAccountId "[email protected]"
61+
62+
.EXAMPLE
63+
64+
This example registers your AzureStack account with Azure, enables syndication, and disables usage reporting to Azure.
65+
66+
.\RegisterWithAzure.ps1 -azureCredential $yourCredentials -azureSubscriptionId $subsciptionId -azureDirectoryTenantName "contoso.onmicrosoft.com" -azureAccountId "[email protected]" -reportUsage:$false
5167
5268
.NOTES
5369
Ensure that you have an Azure subscription and it is registered for Microsoft.AzureStack namespace in Azure.
5470
Namespace can be registered with the following command:
5571
Register-AzureRmResourceProvider -ProviderNamespace 'microsoft.azurestack'
72+
73+
If you would like to un-Register with you azure by turning off marketplace syndication and usage reporting you can run this script again with both enableSyndication
74+
and reportUsage set to false. This will unconfigure usage bridge so that syndication isn't possible and usage data is not reported.
5675
#>
5776

5877

@@ -80,7 +99,7 @@ param(
8099
[bool] $enableSyndication = $true,
81100

82101
[Parameter(Mandatory = $false)]
83-
[Switch] $reportUsage = $false
102+
[Switch] $reportUsage = $true
84103
)
85104

86105
#requires -Module AzureRM.Profile

0 commit comments

Comments
 (0)