Get-SCVMHostRating

Calculates the placement rating for one or more hosts managed by VMM on which you might want to deploy a specific virtual machine.

Description

The Get-SCVMHostRating cmdlet calculates the placement rating for one or more hosts managed by System Center Virtual Machine Manager (VMM) on which you might want to deploy a specific virtual machine. 

The rating indicates the suitability of a computer to serve as a host for a virtual machine that requires a specific hardware configuration. The rating can be computed by individual host, for an array of hosts, or for each host that belongs to a specific host group or set of host groups.

When you run the Get-SCVMHostRating cmdlet, VMM returns an SCVMHostRating object for each of the specified hosts based on the hardware configuration that you want on the virtual machine. You can also specify additional placement options in order to modify how the ratings are calculated.

If you supply multiple host objects or an array of host objects to Get-SCVMHostRating, VMM gathers information about the host objects from the VMM database. To produce a host rating, VMM then compares the running state of the virtual machine against the database information. This operation does not guarantee migration compatibility of the virtual machine with a target host.  

If you supply a single host object that is running Windows Server 2008 R2, or later, VMware, or Citrix XenServer to Get-VMHostRating, the cmdlet performs a direct validation of the running state of the virtual machine against the target host. Performing a direct validation ensures migration compatibility of the virtual machine. When performing the direct validation, the command might take several seconds to complete.

For more information about Get-SCVMHostRating, type: "Get-Help Get-SCVMHostRating -online".

Parameters

Cloud

Required? true
Accept Pipeline Input? false
Position? named
Specifies a private cloud object.

VM

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine object.

VMName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a virtual machine to be placed on a physical host server. Use this parameter to verify that another virtual machine with the same name is not already deployed on that host.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

HighlyAvailable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a virtual machine will be placed on a Hyper-V host that is part of a host cluster. Configure this setting on a virtual machine, or on a template or hardware profile that will be used to create virtual machines.

IsCloudOnlyRating

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the rating only applies to a private cloud.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VM

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine object.

VMHostGroup

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine host group object or an array of host group objects.

VMName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a virtual machine to be placed on a physical host server. Use this parameter to verify that another virtual machine with the same name is not already deployed on that host.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

HighlyAvailable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a virtual machine will be placed on a Hyper-V host that is part of a host cluster. Configure this setting on a virtual machine, or on a template or hardware profile that will be used to create virtual machines.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VM

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine object.

VMHost

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies an array of virtual machine host objects.

VMName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a virtual machine to be placed on a physical host server. Use this parameter to verify that another virtual machine with the same name is not already deployed on that host.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

HighlyAvailable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a virtual machine will be placed on a Hyper-V host that is part of a host cluster. Configure this setting on a virtual machine, or on a template or hardware profile that will be used to create virtual machines.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

Cloud

Required? true
Accept Pipeline Input? false
Position? named
Specifies a private cloud object.

DiskSpaceGB

Required? true
Accept Pipeline Input? false
Position? named
Specifies, in gigabytes (GB), the amount of hard disk space on the host that can be used by a specific virtual machine.
Example: -DiskSpaceGB 20 (to specify 20 GB of disk space)

HardwareProfile

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a hardware profile object.

VMName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a virtual machine to be placed on a physical host server. Use this parameter to verify that another virtual machine with the same name is not already deployed on that host.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

IsCloudOnlyRating

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the rating only applies to a private cloud.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

LUNCountRequirement

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of LUNs required by a virtual machine when evaluating which computers are suitable hosts on which to deploy this virtual machine. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

OperatingSystem

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies the type of operating system for a virtual machine. To list the names of all available operating systems in VMM, type: "Get-SCOperatingSystem".

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VirtualizationPlatform

Required? false
Accept Pipeline Input? false
Position? named
Specifies the virtualization platform of a virtual machine host managed by VMM. Valid values are: HyperV, VMwareESX, XENServer.

Cloud

Required? true
Accept Pipeline Input? false
Position? named
Specifies a private cloud object.

DiskSpaceGB

Required? true
Accept Pipeline Input? false
Position? named
Specifies, in gigabytes (GB), the amount of hard disk space on the host that can be used by a specific virtual machine.
Example: -DiskSpaceGB 20 (to specify 20 GB of disk space)

VMConfiguration

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine configuration object.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

IsCloudOnlyRating

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the rating only applies to a private cloud.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VirtualizationPlatform

Required? false
Accept Pipeline Input? false
Position? named
Specifies the virtualization platform of a virtual machine host managed by VMM. Valid values are: HyperV, VMwareESX, XENServer.

Cloud

Required? true
Accept Pipeline Input? false
Position? named
Specifies a private cloud object.

DiskSpaceGB

Required? true
Accept Pipeline Input? false
Position? named
Specifies, in gigabytes (GB), the amount of hard disk space on the host that can be used by a specific virtual machine.
Example: -DiskSpaceGB 20 (to specify 20 GB of disk space)

VMName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a virtual machine to be placed on a physical host server. Use this parameter to verify that another virtual machine with the same name is not already deployed on that host.

VMTemplate

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM template object used to create virtual machines.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

IsCloudOnlyRating

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the rating only applies to a private cloud.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VirtualizationPlatform

Required? false
Accept Pipeline Input? false
Position? named
Specifies the virtualization platform of a virtual machine host managed by VMM. Valid values are: HyperV, VMwareESX, XENServer.

DiskSpaceGB

Required? true
Accept Pipeline Input? false
Position? named
Specifies, in gigabytes (GB), the amount of hard disk space on the host that can be used by a specific virtual machine.
Example: -DiskSpaceGB 20 (to specify 20 GB of disk space)

HardwareProfile

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a hardware profile object.

VMHostGroup

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine host group object or an array of host group objects.

VMName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a virtual machine to be placed on a physical host server. Use this parameter to verify that another virtual machine with the same name is not already deployed on that host.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

LUNCountRequirement

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of LUNs required by a virtual machine when evaluating which computers are suitable hosts on which to deploy this virtual machine. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

OperatingSystem

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies the type of operating system for a virtual machine. To list the names of all available operating systems in VMM, type: "Get-SCOperatingSystem".

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VirtualizationPlatform

Required? false
Accept Pipeline Input? false
Position? named
Specifies the virtualization platform of a virtual machine host managed by VMM. Valid values are: HyperV, VMwareESX, XENServer.

DiskSpaceGB

Required? true
Accept Pipeline Input? false
Position? named
Specifies, in gigabytes (GB), the amount of hard disk space on the host that can be used by a specific virtual machine.
Example: -DiskSpaceGB 20 (to specify 20 GB of disk space)

VMConfiguration

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine configuration object.

VMHostGroup

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine host group object or an array of host group objects.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VirtualizationPlatform

Required? false
Accept Pipeline Input? false
Position? named
Specifies the virtualization platform of a virtual machine host managed by VMM. Valid values are: HyperV, VMwareESX, XENServer.

DiskSpaceGB

Required? true
Accept Pipeline Input? false
Position? named
Specifies, in gigabytes (GB), the amount of hard disk space on the host that can be used by a specific virtual machine.
Example: -DiskSpaceGB 20 (to specify 20 GB of disk space)

VMHostGroup

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine host group object or an array of host group objects.

VMName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a virtual machine to be placed on a physical host server. Use this parameter to verify that another virtual machine with the same name is not already deployed on that host.

VMTemplate

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM template object used to create virtual machines.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VirtualizationPlatform

Required? false
Accept Pipeline Input? false
Position? named
Specifies the virtualization platform of a virtual machine host managed by VMM. Valid values are: HyperV, VMwareESX, XENServer.

DiskSpaceGB

Required? true
Accept Pipeline Input? false
Position? named
Specifies, in gigabytes (GB), the amount of hard disk space on the host that can be used by a specific virtual machine.
Example: -DiskSpaceGB 20 (to specify 20 GB of disk space)

HardwareProfile

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a hardware profile object.

VMHost

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies an array of virtual machine host objects.

VMName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a virtual machine to be placed on a physical host server. Use this parameter to verify that another virtual machine with the same name is not already deployed on that host.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

LUNCountRequirement

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of LUNs required by a virtual machine when evaluating which computers are suitable hosts on which to deploy this virtual machine. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

OperatingSystem

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies the type of operating system for a virtual machine. To list the names of all available operating systems in VMM, type: "Get-SCOperatingSystem".

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VirtualizationPlatform

Required? false
Accept Pipeline Input? false
Position? named
Specifies the virtualization platform of a virtual machine host managed by VMM. Valid values are: HyperV, VMwareESX, XENServer.

DiskSpaceGB

Required? true
Accept Pipeline Input? false
Position? named
Specifies, in gigabytes (GB), the amount of hard disk space on the host that can be used by a specific virtual machine.
Example: -DiskSpaceGB 20 (to specify 20 GB of disk space)

VMConfiguration

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine configuration object.

VMHost

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies an array of virtual machine host objects.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VirtualizationPlatform

Required? false
Accept Pipeline Input? false
Position? named
Specifies the virtualization platform of a virtual machine host managed by VMM. Valid values are: HyperV, VMwareESX, XENServer.

DiskSpaceGB

Required? true
Accept Pipeline Input? false
Position? named
Specifies, in gigabytes (GB), the amount of hard disk space on the host that can be used by a specific virtual machine.
Example: -DiskSpaceGB 20 (to specify 20 GB of disk space)

VMHost

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies an array of virtual machine host objects.

VMName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a virtual machine to be placed on a physical host server. Use this parameter to verify that another virtual machine with the same name is not already deployed on that host.

VMTemplate

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM template object used to create virtual machines.

CPUExpectedUtilizationPercent

Required? false
Accept Pipeline Input? false
Position? named
Specifies the percent of CPU on the host that you expect this virtual machine to use. This value is used only when VMM determines a suitable host for the virtual machine.

CPUPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of CPU utilization for a virtual machine on a host. To make CPU utilization a higher priority relative to other factors (such as disk I/O performance, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 5. 

DiskIOExpectedCountPerSecond

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of disk input/output operations per second (IOPS) that you expect this virtual machine to use. 

Example format: -DiskIO 1500 (to specify 1500 IOPS).

DiskPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of disk input/output (I/O) performance for a virtual machine on a host. To make disk I/O performance a higher priority relative to other factors (such as CPU utilization, memory utilization, and network utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

IsMigration

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a rating indicating a computer’s suitability as a host to which to move a virtual machine will be calculated even if the source and destination host is the same computer. 

MemoryPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of memory utilization by a virtual machine on a host. To make memory utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and network utilization), set this value to a higher number. Valid Values: 0 through 10. Default value: 8.

NetworkPriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the relative importance of network utilization by a virtual machine on a host. To make network utilization a higher priority relative to other factors (such as CPU utilization, disk I/O performance, and memory utilization), set this value to a higher number. Valid values: 0 through 10. Default value: 2.

NetworkUtilizationExpectedMbps

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabits per second (Mbps), the amount of traffic on the physical host’s network that you expect this virtual machine to use.

PlacementGoal

Required? false
Accept Pipeline Input? false
Position? named
Specifies the placement algorithm to use when VMM selects the most suitable host on which to deploy a virtual machine. Load balancing among hosts lets VMM minimize the processing load on any one host. Consolidation lets VMM maximize resources by combining multiple low-utilization workloads on a single host. Valid values: LoadBalance, Consolidate.

UseDefaultPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies that only volumes for which a default path has been set on the host will be evaluated as possible candidates for virtual machine placement. If you omit this parameter or if no default paths are set on the host, all volumes will be evaluated by the placement process. 

VirtualizationPlatform

Required? false
Accept Pipeline Input? false
Position? named
Specifies the virtualization platform of a virtual machine host managed by VMM. Valid values are: HyperV, VMwareESX, XENServer.

Examples

1: Calculate host ratings for a specific server as a possible host for an existing virtual machine.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost02.Contoso.com" 
PS C:\> $HostRating = Get-SCVMHostRating -VM $VM -VMHost $VMHost
PS C:\> $HostRating
The first command gets the virtual machine object named VM01 and stores the object in the $VM variable.

The second command gets the host object named VMHost02 and stores the object in the $VMHost variable.

The third command returns the placement rating for VMHost02 that indicates its suitability as a host for VM01 and stores the rating information in the $HostRating variable.

The last command displays the host ratings stored in $HostRating to the user.

NOTE: Because the preceding example supplies a single host object to Get-SCVMHostRating, if the host is running Windows Server 2008 R2, or later, VMware, or XenServer, it will perform a direct validation of the running state of the virtual machine against the target host to ensure migration compatibility of the virtual machine.
2: Calculate host ratings for each server in a host group as a possible host for an existing virtual machine.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM02"
PS C:\> $VMHostGroup = Get-SCVMHostGroup -Name "HostGroup02" 
PS C:\> $HostRatings = Get-SCVMHostRating -VM $VM -VMHostGroup $VMHostGroup
PS C:\> $HostRatings
The first command gets the virtual machine object named VM02 and stores the object in the $VM variable.

The second command gets the host group object that named HostGroup02 and stores the object in the $VMHostGroup variable.

The third command returns the placement ratings for all hosts in the specified host group and indicates the suitability of each host in that host group as a host for VM02. The command stores the rating information in $HostRatings.

The last command displays the host ratings stored in $HostRating to the user.

NOTE: Because the preceding example supplies multiple host objects to Get-SCVMHostRating, it will not perform a direct validation of the virtual machine against the hosts to produce host ratings. To ensure migration compatibility, you should perform a direct validation by running the Get-SCVMHostRating cmdlet on each potential target host individually.
3: Calculate host ratings for each server in a host group as a possible host for a new virtual machine.
PS C:\> $VMHostGroup = Get-SCVMHostGroup -Name "HostGroup03"
PS C:\> $HWProfile = Get-SCHardwareProfile | where {$_.Name -eq "HWProfile01"}
PS C:\> $HostRatings = Get-SCVMHostRating -VMHostGroup $VMHostGroup -HardwareProfile $HWProfile -DiskSpaceGB 20 -VMName "VM03" -CPUPriority 8 -MemoryPriority 5 -DiskPriority 3 -NetworkPriority 1 
PS C:\> $HostRatings
The first command gets the host group object named HostGroup03 and stores the object in the $VMHostGroup variable.

The second command gets the hardware profile object named "HWProfile01" and stores the object in the $HWProfile variable.

The third command returns the placement ratings for all hosts in the specified host group for a new virtual machine and stores the placement ratings in $HostRatings. Before determining the host ratings, this command modifies the priorities for various factors by using the following parameters to specify these values: DiskSpaceGB, CPUPriority, MemoryPriority, DiskPriority, and NetworkPriority. See the individual parameter descriptions for additional information. 

The last command displays the host ratings stored in $HostRatings to the user.

NOTE: Because the preceding example supplies multiple host objects to Get-SCVMHostRating, it will not perform a direct validation of the virtual machine against the hosts to produce host ratings. To ensure migration compatibility, you should perform a direct validation by running the Get-SCVMHostRating cmdlet on each potential target host individually.
4: Calculate host ratings for each host in an array as a possible host for a new virtual machine.
PS C:\> $OS = Get-SCOperatingSystem | where {$_.Name -eq "64-bit edition of Windows Server 2008 R2 Standard"}
PS C:\> $JobGroupID = [guid]::NewGuid()
PS C:\> New-SCVirtualDiskDrive -SCSI -Fixed -Bus 0 -Lun 2 -Size 10 -JobGroup $JobGroupID -FileName "TestDiskDrive"
PS C:\> $VMHosts = Get-SCVMHost 
PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "HWProfile01" }
PS C:\> $HostRatings = Get-SCVMHostRating  -DiskSpaceGB 10 -HardwareProfile $HWProfile -VMHost $VMHosts -VMName "VM04" -OperatingSystem $OS -JobGroup $JobGroupID 
PS C:\> $HostRatings
The first command gets the operating system object that represents a 64-bit edition of Windows Server 2008 R2 Standard edition and stores the object in the $OS variable.

The second command generates a GUID and stores the GUID in $JobGroupID. The job group ID functions as an identifier that groups subsequent commands into a single job group.

The third command creates a new virtual disk drive with the specified properties, but uses the job group ID to specify that the virtual disk drive is not created until just before the Get-SCVMHostRating cmdlet in the last command runs.

The fourth and fifth commands retrieve an array of host objects and a specific hardware profile object to pass into the Get-VMHostRating cmdlet in the next command.

The sixth command returns the placement ratings for all hosts in the specified host list and indicates the suitability of each host in that list for the new virtual machine with the specified characteristics. The command stores the rating information in $HostRatings. 

Before the Get-SCVMHostRating cmdlet returns the host ratings, the command uses the JobGroup parameter to run the New-SCVirtualDiskDrive command from the third command so that the Get-SCVMHostRating cmdlet includes the virtual disk drive and its settings when calculating placement ratings.

The last command displays the host ratings stored in $HostRatings to the user.

NOTE: Because the preceding example supplies an array of host objects to Get-SCVMHostRating, it will not perform a direct validation of the virtual machine against the hosts to produce host ratings. To ensure migration compatibility, you should perform a direct validation by running the Get-VMHostRating cmdlet on each potential target host individually.
5: Calculate host ratings for a specific VMM management server as a possible host for an existing virtual machine.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM05"
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost05.Contoso.com" 
PS C:\> $HostRating = Get-SCVMHostRating -VM $VM -VMHost $VMHost -CPUPriority 6 -DiskPriority 5 -MemoryPriority 4 -NetworkPriority 4 -PlacementGoal "Consolidate" 
PS C:\> $HostRating
The first command gets the virtual machine object named VM05 and stores the object in the $VM variable.

The second command gets the host object named VMHost05 and stores the object in the $VMHost variable.

The third command returns the placement rating for VMHost05 which indicates its suitability as a host for VM05 based on a particular set of customized priority ratings and based on consolidation as the placement goal (as opposed to the default, load balancing). The command stores the rating information in $HostRating.

The last command displays the host rating stored in $HostRating to the user.

NOTE: Because the preceding example supplies a single host object to Get-VMHostRating, if the host is running Windows Server 2008 R2, or later, VMware, or XenServer, it will perform a direct validation of the running state of the virtual machine against the target host to ensure migration compatibility of the virtual machine.
6: Calculate host ratings for a new virtual machine based on a specific virtual machine template.
PS C:\> $VMTemplate = Get-SCVMTemplate | where {$_.Name -eq "VMTemplate01"}
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com" 
PS C:\> $HostRating = Get-SCVMHostRating -DiskSpaceGB 5 -VMTemplate $VMTemplate -VMHost $VMHost -VMName "VM06"
PS C:\> $HostRating
The first command gets the virtual machine template object named "VMTemplate01" and stores the object in the $VMTemplate variable.

The second command gets the host object named VMHost01 and stores the object in the $VMHost variable.

The third command returns the placement ratings for a new virtual machine if it were created by using VMTemplate01 and if it were to be placed on host VMHost01. The command stores the ratings in $HostRating. 

The last command displays the host ratings stored in $HostRating to the user.

NOTE: The DiskSpaceGB parameter is required even though the template might already have a virtual hard disk with a specified amount of disk space. Requiring the DiskSpaceGB parameter ensures that a certain minumum amount of hard disk space is available on the host that can be used by the virtual machine. If the amount of space specified for the virtual hard disk in the template is larger than the size specified by using the DiskSpaceGB parameter, the larger of the two sizes is taken into consideration when computing the host ratings.

NOTE: Because the preceding example supplies a single host object to Get-VMHostRating, if the host is running Windows Server 2008 R2, or later, VMware, or XenServer, it will perform a direct validation of the running state of the virtual machine against the target host to ensure migration compatibility of the virtual machine.
7: Calculate host ratings for a specific host as a possible host for all virtual machines.
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost02.Contoso.com" 
PS C:\> $VMs = Get-SCVirtualMachine
PS C:\> $RatingArray = @( ForEach ($VM in $VMs) {Get-VMHostRating -VM $VM -VMHost $VMHost} )
PS C:\> $RatingArray
The first command gets the host object that named VMHost02 and stores the host object in the $VMHost variable.

The second command gets all virtual machines objects in your environment and saves these objects in the $VMs object array. If your environment has a very large number of virtual machines, you might want to use a filter to select a subset of virtual machines.

The third command returns the placement ratings for VMHost02 which indicate its suitability as a host for each of the virtual machine objects in $VMs and stores the rating information in $RatingArray. For more information about the Windows PowerShell foreach loop statement, type: Get-Help about_ForEach.

The last command displays the ratings stored in $RatingArray for the user.

NOTE: This example computes the ratings for each virtual machine individually on a host. If you want to place multiple virtual machines on a host, create a temporary hardware profile with the aggregated resource demands and pass it to Get-SCVMHostRating.

NOTE: Because the preceding example supplies a single host object to Get-VMHostRating, if the host is running Windows Server 2008 R2, or later, VMware, or XenServer, it will perform a direct validation of the running state of the virtual machine against the target host to ensure migration compatibility of the virtual machine.

See Also