Skip to content

Instantly share code, notes, and snippets.

Jennelle Crothers techbunny

Block or report user

Report or block techbunny

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
techbunny / ImpLab_StaticIPs
Created Dec 23, 2014
The Imperfect Lab: Static IPs
View ImpLab_StaticIPs
# You can double check that an address is free with:
Test-AzureStaticVNetIP –VNetName ImperfectNet –IPAddress
# To set the static address, I used:
Get-AzureVM -ServiceName ImperfectCore -Name DC-Cloud1 | Set-AzureStaticVNetIP -IPAddress "" | 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 ''
-InstallDns:$true -LogPath 'C:\Windows\NTDS' -NoGlobalCatalog:$false -SiteName 'ImperfectNet' -SysvolPath 'C:\Windows\SYSVOL'
-NoRebootOnCompletion:$true -Force:$true -Verbose
techbunny / ImpLab_AzureFiles
Last active Aug 29, 2015
The Imperfect Lab: Azure Files
View ImpLab_AzureFiles
# 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:
techbunny / ImpLab_DeployVMs
Created Dec 23, 2014
The Imperfect Lab: Deploying VMs
View ImpLab_DeployVMs
# 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 = ""
# Pick up that VM image the full list with:
techbunny / ImpLab_EarlySnippets
Created Dec 23, 2014
The Imperfect Lab: Early Post Snippets
View ImpLab_EarlySnippets
# 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
You can’t perform that action at this time.