-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSteps_after_Install_AzureStack.ps1
More file actions
57 lines (40 loc) · 1.78 KB
/
Steps_after_Install_AzureStack.ps1
File metadata and controls
57 lines (40 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<#
.SYNOPSIS
Configurering AzureStack after Installation.
.DESCRIPTION
The Steps:
1. Reset the password expiration to 180 days
2. Register Azure Stack with your Azure Subscription
3. Connect to AzureStack
.NOTES
Version: 1.0
Author: Christian Twilfer (c.twilfer@tec-networks.de]
Creation Date: 16.11.2017
Purpose/Change: Initial script development
There are the necessary files and folders on the network share. These are copied according to the script to the C drive
It is required that in the run-up to the current ASDK is downloaded, unpacked and is uploaded on the share
#>
# Reset the password expiration to 180 days
Set-ADDefaultDomainPasswordPolicy -MaxPasswordAge 180.00:00:00 -Identity azurestack.local
# Overall Process for combining AzS to Azure
# Install Powershell
Set-PSRepository `
-Name "PSGallery" `
-InstallationPolicy Trusted
Get-Module -ListAvailable | where-Object {$_.Name -like “Azure*”} | Uninstall-Module
# Install the AzureRM.Bootstrapper module. Select Yes when prompted to install NuGet
Install-Module `
-Name AzureRm.BootStrapper
# Install and import the API Version Profile required by Azure Stack into the current PowerShell session.
Use-AzureRmProfile `
-Profile 2017-03-09-profile -Force
Install-Module `
-Name AzureStack `
-RequiredVersion 1.2.10
# Login to Azure
Login-AzureRmAccount -EnvironmentName "AzureCloud"
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack
# Import Register Module
Import-Module c:\temp\RegisterWithAzure.psm1 -Force -Verbose
# Register
Add-AzsRegistration -CloudAdminCredential azurestack\azurestackadmin -AzureDirectoryTenantName [yourTenantName] -AzureSubscriptionId [yourSubscriptionID] -PrivilegedEndpoint AzS-ERCS01 -BillingModel Development