Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. # Install the AzureRM.Bootstrapper module. Select Yes when prompted to install NuGet
  2. Install-Module `
  3. -Name AzureRm.BootStrapper
  4.  
  5. # Install and import the API Version Profile required by Azure Stack into the current PowerShell session.
  6. Install-AzureRMProfile -Profile 2017-03-09-profile
  7.  
  8. # Install and import the API Version Profile required by Azure Stack into the current PowerShell session.
  9. Use-AzureRmProfile `
  10. -Profile 2017-03-09-profile -Force
  11.  
  12. Install-Module `
  13. -Name AzureStack `
  14. -RequiredVersion 1.2.11
  15.  
  16. # Installs and imports the specified API version profile into the current PowerShell session.
  17. # Use-AzureRmProfile -Profile 2017-03-09-profile -Scope CurrentUser
  18.  
  19. # Installs and imports the specified API version profile into the current PowerShell session without any prompts
  20. # Use-AzureRmProfile -Profile 2017-03-09-profile -Scope CurrentUser -Force
  21.  
  22. # Installs and imports the compute, Storage and Network modules from the specified API version profile into your current PowerShell session.
  23. # Use-AzureRmProfile -Profile 2017-03-09-profile -Module AzureRM.Compute, AzureRM.Storage, AzureRM.Network
  24.  
  25. # Navigate to the downloaded folder and import the **Connect** PowerShell module
  26. Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
  27. Import-Module .\Connect\AzureStack.Connect.psm1
  28.  
  29. # For Azure Stack development kit, this value is set to https://management.local.azurestack.external. To get this value for Azure Stack integrated systems, contact your service provider.
  30. $ArmEndpoint = "https://management.jkt.cbncloud.co.id"
  31.  
  32. # For Azure Stack development kit, this value is set to https://graph.windows.net/. To get this value for Azure Stack integrated systems, contact your service provider.
  33. $GraphAudience = "https://graph.windows.net"
  34.  
  35. # Register an AzureRM environment that targets your Azure Stack instance
  36. Add-AzureRMEnvironment `
  37. -Name "AzureStackUser" `
  38. -ArmEndpoint $ArmEndpoint
  39.  
  40. # Set the GraphEndpointResourceId value
  41. Set-AzureRmEnvironment `
  42. -Name "AzureStackUser" `
  43. -GraphAudience $GraphAudience
  44.  
  45. # Get the Active Directory tenantId that is used to deploy Azure Stack
  46. $TenantID = Get-AzsDirectoryTenantId `
  47. -AADTenantName "cbncloud2.onmicrosoft.com" `
  48. -EnvironmentName "AzureStackUser"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement