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
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 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
@techbunny
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
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 = "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201411.01-en.us-127GB.vhd"
# Pick up that VM image the full list with:
@techbunny
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.