Adds examples of all 3 registration functions
This commit is contained in:
brbartle 2017-09-18 15:28:06 -07:00 коммит произвёл GitHub
Родитель 496f7caa00
Коммит e9d3839cba
1 изменённых файлов: 14 добавлений и 4 удалений

Просмотреть файл

@ -4,12 +4,22 @@ The functions in this module allow you to perform the steps of registering your
These functions must be run from the Host machine. As a prerequisite, make sure that you have an Azure subscription and that you have installed the correct version of Azure Powershell as outlined here: [Install Powershell for Azure Stack](https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-powershell-install)
Once you have downloaded this module, to run the functions contained:
Once you have downloaded this module, open an elevated instance of Powershell ISE and run the functions contained:
To register with Azure and enable marketplace syndication and usage data reporting:
```powershell
CD "<path to RegisterWithAzure.psm1>"
Import-Module RegisterWithAzure.psm1
Add-AzSRegistration -CloudAdminCredential $cloudAdminCredential -AzureSubscriptionId $AzureSubscriptionId -JeaComputerName $JeaComputerName
Import-Module "<path to RegisterWithAzure.psm1>" -Force -Verbose
Add-AzsRegistration -CloudAdminCredential $cloudAdminCredential -AzureDirectoryTenantName $azureDirectoryTenantName -AzureSubscriptionId $azureSubscriptionId -PrivilegedEndpoint $privilegedEndpoint -BillingModel PayAsYouUse
```
To switch the existing registration to a new subscription or directory:
```powershell
Set-AzsRegistrationSubscription -CloudAdminCredential $cloudAdminCredential -AzureDirectoryTenantName $azureDirectoryTenantName -NewAzureDirectoryTenantName $NewDirectoryTenantName -CurrentAzureSubscriptionId $azureSubscriptionId -NewAzureSubscriptionId $NewAzureSubscriptionId -PrivilegedEndpoint $privilegedEndpoint -BillingModel PayAsYouUse
```
To remove the existing registration resource and disable marketplace syndication and usage data reporting:
```powershell
Remove-AzsRegistration -CloudAdminCredential $cloudAdminCredential -AzureDirectoryTenantName $azureDirectoryTenantName -AzureSubscriptionId $azureSubscriptionId -PrivilegedEndpoint $privilegedEndpoint -BillingModel PayAsYouUse
```
If you are not logged into an Azure account during your powershell session you will be prompted for your Azure credentials before registration completes.