Last week I was presenting on BriForum in Chicago about PowerShell.
On my last day, Gabe Knuth was in the speaker room and gave me a paperback copy of the book he, Brian Madden and Jack Madden wrote named The VDI Delusion.
I got all three authors and while Brian was signing it I told him that I was going to post a contest on my blog with some crazy question… and the person would get the question right would win the book.
Now, if multiple persons will get the question right I will pick one at random.
Apparently Brian liked this idea since he made a personal quote in the book to who ever wins the contest
So, the question you need to answer to win this free and signed paperback copy of The VDI Delusion is:
What is the name of the virus created by Tony Stark (Iron Man)?
Hint: It’s not Extremis or Ultron…
P.S. This contest ends at the 10th of August… Please leave your name and email address in the comment section so I can contact you if you’re the winner.
The contest has ended! And the winner is: Ben Meints!
One of our architects asked me to configure settings on some VDI virtual machines in our Hyper-V environment, specifically the “Automatic Start Action” and “Automatic Stop Action” setting. After some searching in SCVMM, I was unable to find a configuration on the template where I could set this.
So, I turned to PowerShell.
1) We want to set the “Automatic Stop Action” to “Power Off” in order to disable the Save State when a Hyper-V server reboots. Since this is a VDI environment, it is desirable to shut down the VM’s since when a host reboots, the VM’s will be provisioned with the latest vDisk instead of picking up where they left and therefor still using the “old” vDisk.
2) We want to set the “Automatic Start Action” to “None” in order to not let the virtual machines come online when the host is rebooted, for example because the Desktop Group could be set in maintenance mode within the time the Hyper-V server rebooted.
I actually found several scripts on the internet, but all of them a bit complicated and rather large… since I’m a guy of few lines, this is what I came up with:
$VMMServer = Get-VMMServer -Computername "scvmm"
Get-VM | Set-VM -StartAction NeverAutoTurnOnVM -StopAction TurnOffVM