Create a list of all VMs with the "Allow migration to a virtual machine host with a difference processor version"

Duncan Butcher 1 Reputation point
2020-08-06T13:14:40.357+00:00

Hello,

Is there a Powershell command I can run to get a list of all virtual machines in SCVMM with the "Allow migration to a virtual machine host with a difference processor version" checkbox NOT set?

Thanks,
Duncan.

System Center Virtual Machine Manager
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,738 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,561 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. MarkosP 81 Reputation points
    2020-09-29T08:44:42.6+00:00

    The property is called LimitCPUForMigration in VMM and you get the VMs easily like this for example:
    Get-SCVirtualMachine | Where-Object {$_.LimitCPUForMigration -eq $False} | Select-Object Name, LimitCPUForMigration

    1 person found this answer helpful.
    0 comments No comments

  2. Leon Laude 85,816 Reputation points
    2020-08-06T15:14:09.82+00:00

    Hi,

    I don't have an SCVMM environment to test with, but you can get a list of all virtual machines with the CPU compatibility information with the following PowerShell command:

    Get-VMProcessor * -ComputerName Localhost | Select VMName, CompatibilityForMigrationEnabled
    

    (If the reply was helpful please don't forget to accept as answer, thank you)

    Best regards,
    Leon

    0 comments No comments

  3. Duncan Butcher 1 Reputation point
    2020-08-07T14:42:22.783+00:00

    This works when run from each host directly, however I have many hosts which is why I was hoping to do it from SCVMM. I can use this command in SCVMM to get a list of VMs:

    Get-SCVirtualMachine

    However I cannot find the CompatibilityForMigrationEnabled from this output, get-vmprocessor does not work from the SCVMM node.

    Would it be possible to create a list of VMhosts and use PSremote to run the Get-VMProcessor * -ComputerName Localhost | Select VMName, CompatibilityForMigrationEnabled on each host?


  4. TimCerling(ret) 1,156 Reputation points
    2020-08-08T13:41:08.547+00:00

    The System Center Virtual Machine Manager forum still exists in Technet at https://social.technet.microsoft.com/Forums/en-US/home?forum=virtualmachinemanager You would most likely be better served by asking the experts in that forum about how to use PowerShell to accomplish your query.

    You may also find additional assistance via the PowerShell Gallery. https://learn.microsoft.com/en-us/powershell/scripting/gallery/overview

    0 comments No comments

  5. 2020-08-20T01:49:04.777+00:00

    Hi, given that this post has been quiet for a while, this is a quick question and answer. Has your question been solved? If so, please mark it as an answer so that users with the same question can find and get help.
    :)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.