Skip to content

Instantly share code, notes, and snippets.

@techbunny
Created December 23, 2014 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techbunny/09652628705915b9151a to your computer and use it in GitHub Desktop.
Save techbunny/09652628705915b9151a to your computer and use it in GitHub Desktop.
The Imperfect Lab: Early Post Snippets
# 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
Add-WindowsFeature -name ad-domain-services -IncludeManagementTools
Install-ADDSForest -DomainName "yourdomain.com" -ForestMode 5 -DomainMode 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment