PowerCLI editing configuration question


I am looking to apply this fix for the issue "Windows 8 and Windows 2012 Server virtual machines fail upon reboot (2092807)" (see http://kb.vmware.com/kb/2092807), as I've been experiencing it in my environment.

There are two ways to apply the fix:

1. You shut down the VM then edit and update the configuration accordingly, then power it back on.
2. You run a provided powershell script within PowerCLI

The code for option 2 is below.
What I'm unsure of and seeking advice on here, is how/why there is no mention of the VM's having to be shut-down as part of the fix like you'd have to shut them down in #1.
Is the powershell script below shutting them down somehow?
Has anyone experienced applying this fix?

ForEach ($vm in (Get-VM)){
$vmv = Get-VM $vm | Get-View
$name = $vmv.Name
$guestid = $vmv.Summary.Config.GuestId
$state = $vmv.Summary.Runtime.PowerState
$vmx = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmx.extraConfig += New-Object VMware.Vim.OptionValue 
$vmx.extraConfig[0].key = "monitor_control.enable_softResetClearTSC"
$vmx.extraConfig[0].value = "TRUE"
if ($guestid -like "windows8*Guest") {
if ($state -eq "poweredOn") {
$vmv.MigrateVM_Task($null, $_.Runtime.Host, 'highPriority', $null)

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
A quick look while I'm on mobile tells me it will go over all your vm's and check if it's a Windows 8 guest, if it is it will change a setting... I'll have to look closer to see if it reboots the guest as well...
Zephyr ICTCloud ArchitectCommented:
Taking a closer look, it will check all windows8srv so Windows 2012 machines as well ... It also doesn't reboot the guests but rather performs a stationery migration, which presumably changes the setting.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
garryshapeAuthor Commented:
Ok that's what I had gathered from cmdlet research and other comments, but I wasn't sure if it was stationary migration.
Do stationary migration have any space requirements that you're aware of?
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Zephyr ICTCloud ArchitectCommented:
Not that I'm aware of, haven't paid attention to it to be honest, I'm in a luxury position on storage front...
garryshapeAuthor Commented:
Cool ty for reviewing my question and providing the info!
Zephyr ICTCloud ArchitectCommented:
No problem, good luck!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.