Posts tagged with Hyper-V

Nested Hyper-V Networking

February 19th, 2017 by and tagged , , , , ,

As I was trying to configure a new lab setup that takes advantage of nested Hyper-V so that I can build a lab to do Hyper-V host clustering, I ran into a problem with networking. Everything looked good on the “host1” virtual machine, but the domain controller I created for TreyResearch.net that runs as a […]

Posted in Building Labs, Hyper-V, Networking, PowerShell, Windows 10, Windows Server 2016 | No Comments »

Building a Lab in Hyper-V with PowerShell, Part 2

February 16th, 2017 by and tagged , , ,

Creating VMs with New-myVM.ps1 – Part 1 As we saw in Part 1 of this series, I build my labs almost entirely with Windows PowerShell scripts. In that first post, I showed how to set the MAC address range on a Hyper-V host. I use this MAC address range to explicitly set my lab VMs […]

Posted in Building Labs, Hyper-V, PowerShell, Windows 10, Windows Server, Windows Server 2016 | No Comments »

Building a Lab in Hyper-V with PowerShell, Part 1

January 29th, 2017 by and tagged , ,

Setting the MAC Address Range on a Hyper-V Host   Today I want to start a new series of posts on building a lab environment in Hyper-V, primarily using Windows PowerShell to do initial configuration. For some things, you’ll need to use a non-PowerShell tool, such as SysPrep or even the Hyper-V Manager. But the […]

Posted in Building Labs, Hyper-V, PowerShell | No Comments »

Param() Tricks

September 25th, 2016 by and tagged , , , ,

One of the new features of PowerShell v5 is support for creating hard links, symbolic links and junctions. This is long overdue, and much appreciated. Before, I’d been forced to the workaround of using “cmd /c mklink” to create links, and I’m always glad to find a way to get rid of any vestige of […]

Posted in Hyper-V, PowerShell | No Comments »

Shutting Down Running VMs – Revisited

June 4th, 2016 by and tagged , ,

A couple of years ago, I posted a perfectly good snippet for shutting down the running VMs on a machine. But the code there is very much the “old syntax” and not terribly elegant.  For shutting down all the running RODCs, I used: Get-VM -Name *rodc* | Where-Object {$_.State -eq “Running” } | Foreach-Object { […]

Posted in Hyper-V, PowerShell | No Comments »

Getting the IP addresses of running VMs

April 23rd, 2014 by and tagged , ,

  Ben Armstrong posted a great little tip on his blog the other day. He has a little one-line PowerShell command that gives you a listing of all the running VMs on a host, and the IP addresses being used by each of them. Get-VM | ?{$_.State -eq “Running”}   Get-VMNetworkAdapter | Select VMName, IPAddresses […]

Posted in Hyper-V, PowerShell | Comments Off on Getting the IP addresses of running VMs

Stopping All Running Virtual Machines (Hyper-V)

April 6th, 2012 by and tagged , ,

So, a good friend and fellow MVP asked me for a script to shut down all running virtual machines on a server so she could do cold backups of them. This seemed like a perfectly reasonable request, and my first thought was “Well, this gets really obvious and easy in Windows Server 8” since we […]

Posted in Hyper-V, WMI | Comments Off on Stopping All Running Virtual Machines (Hyper-V)

Uninstalling Windows Server 2008 R2 SP1 Beta and RC

February 16th, 2011 by and tagged ,

Before you can install Windows Server 2008 R2 SP1 (or Windows 7 SP1), you need to uninstall the beta or RC version that might be installed. On a GUI install of Windows Server, no problem, run AppWiz.cpl and click on Updates. But on Hyper-V Server 2008 R2 (or Server Core) there is no obvious way […]

Posted in Hyper-V, Windows Server, Windows Update | Comments Off on Uninstalling Windows Server 2008 R2 SP1 Beta and RC

PowerShell, Hyper-V and WMI

February 15th, 2011 by and tagged , ,

I’ve started an article over on the PowerShell Survival Guide Wiki to drop in quick hits how to do “stuff” with Hyper-V, using PowerShell and the native WMI interface of Hyper-V. The WMI namespace for Hyper-V is  “root\virtualization”. Turns out managing Hyper-V isn’t as hard as I thought, at least in no small part because […]

Posted in Hyper-V, PowerShell, Windows Server, WMI | Comments Off on PowerShell, Hyper-V and WMI