Posts

Showing posts from June, 2018

Automating new VM's in Hyper-V or "How I saved a bunch of time by switching to powershell automation"

Image
When studying for certifications while also trying to maintain a healthy home and work life, time is often a limiting factor. When you only have a very small fraction of your week to construct and configure your lab environment, automation can be a life-saver. Enter automating Hyper-V virtual machine creation. My end goal was to have a web app that would take inputs of some parameters and then create a VM based on those. Realizing I was way in over my head with web dev skills lacking, I settled on a powershell GUI script instead. I started with a small script that would create a VM from a powershell console: $DCName = read-host "Server Name" $VHDPath = "C:\VM\$DCName\$DCName.vhdx" new-vm -MemoryStartupBytes 2GB -Generation 2 -NoVHD -Name $DCName Set-VM -name $DCName -ProcessorCount 2 New-VHD -Path $VHDPath -Parentpath "C:\VM\WinSrv2012R2\WinSrv2012Temp\WinSrv2012R2.vhdx" -Differencing Add-VMNetworkAdapter -VMname $DCName Get-vm $DCname | Add-VM...

new-blogpage -erroraction SilentlyContinue

Welcome to the first post for my blog. I'll be chronicling my adventures as I try to sponge my way through the endless sea of knowledge that is Enterprise IT. I'll be focusing mostly on MCSA material, with the occasional dabbling of powershell scripting, Azure fiddling, and VMware tinkering, and Kali Linux exploiting. While most of the pages are under construction. I hope to complete at least one new post a week where I cover the research I've done on various topics, scripts I've written and other things I've worked on. Thanks for visiting!