This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SOURCE Storage Account | |
---------------------- | |
Access Key - | |
URL - | |
DESTINATION Storage Account | |
---------------------------- | |
Access Key - | |
URL - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To add VMs to Availability Sets | |
Get-AzureVM -ServiceName "<cloudservicename>" -Name "<servername>" | |
| Set-AzureAvailabilitySet -AvailabilitySetName "<AVSetName>" | |
| Update-AzureVM | |
# To availability sets that exist in your subscription | |
(Get-AzureService).servicename | |
| foreach {Get-AzureVM -ServiceName $_ } | |
| select name,AvailabilitySetName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting Keys for Azure VNET-to-VNET Connectivity | |
Set-AzureVNetGatewayKey -VNetName YourVNETName -LocalNetworkSiteName TheOppositeLocalNet -SharedKey abc123xyz | |
Set-AzureVNetGatewayKey -TheOtherVNetName YourVNETName -LocalNetworkSiteName TheOtherLocalNet -SharedKey abc123xyz | |
# Connect Remotely to VMs | |
$uri = Get-AzureWinRMUri -ServiceName $cloudServiceName -Name $Name | |
$cred = Get-Credential | |
Enter-PSSession -ConnectionUri $uri -Credential $cred | |
# Install Active Directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set Your Subscription and Storage Account | |
Set-AzureSubscription -SubscriptionName "Visual Studio Ultimate with MSDN" -CurrentStorageAccount "imperfectstore" | |
# Set basic variables for your VM. In this case, this is the adminstrator name and password, as well as the name of the Windows Server 2012 R2 image available at the time of this exercise. You'll want to make sure to get the current name of whatever OS you want to install. | |
$un = "adminname" | |
$pwd = "secretpassword" | |
$image = "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201411.01-en.us-127GB.vhd" | |
# Pick up that VM image the full list with: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created a new storage account: | |
New-AzureStorageAccount -StorageAccountName <storageaccountname> -Location ‘West US’ | |
# Captured the Access Key as a variable: | |
$storageAccessKey = (Get-AzureStorageKey –StorageAccountName <storageaccountname>).Primary | |
# Created a security context with the access key: | |
$storageContext = New-AzureStorageContext <storageaccountname> $storageAccessKey | |
# Created a new share: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can double check that an address is free with: | |
Test-AzureStaticVNetIP –VNetName ImperfectNet –IPAddress 192.168.1.5 | |
# To set the static address, I used: | |
Get-AzureVM -ServiceName ImperfectCore -Name DC-Cloud1 | Set-AzureStaticVNetIP -IPAddress "192.168.1.4" | Update-AzureVM | |
# Kick off the addition of my second domain controller in this domain, I used: | |
Install-ADDSDomainController -Credential (Get-Credential) -DatabasePath 'C:\Windows\NTDS' -DomainName 'imperfectlab.com' | |
-InstallDns:$true -LogPath 'C:\Windows\NTDS' -NoGlobalCatalog:$false -SiteName 'ImperfectNet' -SysvolPath 'C:\Windows\SYSVOL' | |
-NoRebootOnCompletion:$true -Force:$true -Verbose |
NewerOlder