The New-SCVMHost cmdlet creates a Virtual Machine Manager (VMM) host from a physical computer by using the properties defined in a host profile.
The physical computer must have an out-of-band controller.
Before you create a host, ensure that a PXE server has been added to VMM, a host profile has been created, and any needed driver files have been added to the library.
Note: The PXE server you add to VMM must be in the same subnet as the physical computers that you want to convert to managed Hyper-V hosts.
For more information about the types of hosts supported by VMM, type Get-Help Add-SCVMHost -Detailed.
Examples
Example 1: Create a host from a physical computer by using a DHCP-based host profile
The first command gets the Run As account object named BMCRunAsAcct and stores the object in the $BMCRAA variable.
The second command discovers the physical computer with the IP address of 10.10.0.1 using the Run As account supplied in $BMCRAA.
It then stores the physical computer in the $NewPhysicalComputer variable.
The third command gets the host group object named HostGroup01 and stores the object in the $HostGroup variable.
The fourth command gets the host profile object named HostProfile01 and stores the object in the $HostProfile variable.
HostProfile01 is configured to obtain an IP address through the DHCP service.
The last command creates a host from the physical computer stored in $NewPhysicalComputer using the host profile stored in $HostProfile, and names it NewHost01.
Example 2: Create a host from a physical computer by using a static IP-based host profile
The first command gets the Run As account object named BMCRunAsAccount and stores the object in the $BMCRAA variable.
The second command discovers the computer with the address 10.10.0.1, using the Run As account stored in $BMCRAA, and then stores the computer in the $NewPhysicalComputer variable.
The third command gets the host group object named HostGroup01 and stores the object in the $HostGroup variable.
The fourth command gets the host profile object named HostProfile02 and stores the object in the $HostProfile variable.
HostProfile02 is configured to allocate a static IP address.
The last command creates a host from the physical computer stored in $NewPhysicalComputer using the host profile stored in $HostProfile, gives it the name NewHost02, and configures the MAC address, IPAddress, and subnet.
Example 3: Redeploy an existing host with a new host profile
The first command gets the Run As account object named BMCRunAsAccount and stores the object in the $BMCRaa variable.
The next eight commands save properties from the host that you are going to redeploy.
The tenth command removes the old host from VMM.
The eleventh command gets the host group object named New HostGroup01 and stores the object in the $NewHostGroup variable.
The twelfth command gets the host profile object named HostProfile02 and stores the object in the $NewHostProfile variable.
The last command redeploys the old host using the previous settings that identify the host, but to a new host gorup (stored in $NewHostGroup) and with updated profile settings (stored in $NewHostProfile).
Parameters
-BMCAddress
Specifies, or updates, the out-of-band baseboard management controller (BMC) address for a specific physical machine.
This might be an IP address, the fully qualified domain name (FQDN), or the DNS prefix (which is usually the same name as the NetBIOS name).
Typically, the BMC address and its connection to the network are separate from the IP address associated with a standard network adapter.
Alternatively, some computers do use a standard network adapter to provide a single address for the BMC and for the network adapter.
However, the BMC address has a unique port and is thus uniquely identifiable on the network.
Example IPv4 format: -BMCAddress "10.0.0.21"
Example Ipv6 format: -BMCAddress "2001:4898:2a:3:657b:9c7a:e1f0:6829"
Example FQDN format: -BMCAddress "Computer01.Contoso.com"
Example NetBIOS format: -BMCAddress "Computer01"
Note: By default, VMM uses an IP address or FQDN for the BMCAddress.
However, it is also possible to create a Windows PowerShell module that enables you to specify other types of addresses as the BMC address.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-BMCCustomConfigurationProvider
Specifies, or updates, a configuration provider object for a baseboard management controller (BMC).
A configuration provider is a plug-in to VMM that translates VMM PowerShell commands to API calls that are specific to a type of baseboard management controller.
You should use this parameter with the Custom BMCProtocol.
Parameter properties
Type:
ConfigurationProvider
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-BMCPort
Specifies, or updates, the out-of-band baseboard management controller (BMC) port for a specific physical machine.
A BMC port is also known as a service processor port.
Example default ports are 623 for IPMI and 443 for SMASH over WS-Man.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-BMCProtocol
Specifies, or updates, the protocol that VMM uses to communicate with the out-of-band baseboard management controller (BMC).
Valid values are: IPMI, SMASH, Custom.
A BMC (also known as a service processor or management controller) is a specialized controller on the motherboard of a server that acts an interface between the hardware and system management software.
If the motherboard of a physical machine includes a BMC, when the machine is plugged in (whether it is powered off or powered on, and whether or not an operating system is installed), information about system hardware and the state of that system hardware health is available.
Example format: -BMCProtocol "Custom"
Note: The Custom protocol requires that you use the BMCCustomConfigurationProvider parameter.
Parameter properties
Type:
OutOfBandManagementType
Default value:
None
Accepted values:
None, IPMI, SMASH, Custom
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-BMCRunAsAccount
Specifies the Run As account to use with the baseboard management controller (BMC) device.
Parameter properties
Type:
RunAsAccount
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-BypassADMachineAccountCheck
Indicates that this cmdlet reuses a computer account that already exists in Active Directory.
By default, New-SCVMHost checks Active Directory for an existing account with the specified name to prevent overwriting computer accounts.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacySkipBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ComputerName
Specifies the name of a computer that VMM can uniquely identify on your network.
The acceptable values for this parameter are:
FQDN
IPv4 or IPv6 address
NetBIOS name
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacySkipBMCPowerControl
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Description
Specifies a description for the VMM host.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacySkipBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IPAddress
Specifies an IPv4 or IPv6 address.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacySkipBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-LogicalNetwork
Specifies a logical network.
A logical network is a named grouping of IP subnets and VLANs that is used to organize and simplify network assignments.
Parameter properties
Type:
LogicalNetwork
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacySkipBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ManagementAdapterMACAddress
Specifies the MAC address of the physical network adapter on the computer that is to be used by the VMM server to communicate with this host.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacySkipBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PROTipID
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action.
This parameter lets you audit PRO tips.
Parameter properties
Type:
Guid
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SMBiosGuid
Specifies the System Management BIOS globally unique identifier (SMBIOS GUID) for a physical computer that is associated with a record for that physical computer in VMM.
SMBIOS defines data structures and access methods that enable a user or application to store and retrieve information about hardware on this computer, such as the name of the system, manufacturer, or the system BIOS version.
Windows gets SMBIOS data at system startup and makes that data available to programs.
Parameter properties
Type:
Guid
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacySkipBMCPowerControl
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Subnet
Specifies an IP subnet (IPv4 or IPv6) in Classless Inter-Domain Routing (CIDR) notation.
Example format for an IPv4 subnet: 192.168.0.1/24
Example format for an IPv6 subnet: FD4A:29CD:184F:3A2C::/64
Note: An IP subnet cannot overlap with any other subnet in a host group or child host groups.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacySkipBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMHostConfig
Specifies a physical computer configuration object.
Parameter properties
Type:
PhysicalComputerConfig
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
UseHostConfig
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMHostGroup
Specifies a virtual machine host group object.
Parameter properties
Type:
HostGroup
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacySkipBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMHostProfile
Specifies a virtual machine host profile object.
Parameter properties
Type:
PhysicalComputerProfile
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LegacySkipBMCPowerControl
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
LegacyUseBMCPowerControl
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMMServer
Specifies a VMM server object.
Parameter properties
Type:
ServerConnection
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
Outputs
Host
This cmdlet returns a Host object.
Notes
Requires a host profile object, which can be retrieved using the Get-SCVMHostProfile cmdlet.