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
Create a list of all VMs with the "Allow migration to a virtual machine host with a difference processor version"
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.
5 answers
Sort by: Most helpful
-
MarkosP 81 Reputation points
2020-09-29T08:44:42.6+00:00 -
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 -
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?
-
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
-
Young Yang (Shanghai Wicresoft Co,.Ltd.) 661 Reputation points
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.
:)