New-SCP2V

Converts a physical machine to a virtual machine on a Hyper-V host managed by VMM.

Description

The New-SCP2V cmdlet converts a physical machine to a virtual machine on a Hyper-V host managed by System Center Virtual Machine Manager (VMM). You cannot specify a VMware ESX host or a Citrix XenServer host as the destination host for the new virtual machine.

In a P2V conversion, you create a virtual machine from a physical source computer. The New-SCP2V cmdlet configures the new virtual machine to have the same hardware, software, and configuration settings as the physical source computer and to have the same identity (ComputerName.DomainName) as the source computer. During the P2V conversion, disk images of the hard disks on the physical computer are copied to Windows-based virtual hard disk files (.vhd files) for use in the new virtual machine.

For information about the operating systems for which VMM supports P2V, see "Converting Physical Computers to Virtual Machines in VMM" in the TechNet Library at http://go.microsoft.com/fwlink/?LinkId=225101.

ADDING NEEDED FILES TO THE PATCH CACHE
--------------------------------------
Some conversions might require that additional files be added to the internal cache. You can use the Add-SCPatch cmdlet to add the required files to the cache.

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

Parameters

SourceComputerName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the source computer for a physical-to-virtual (P2V) machine conversion performed by VMM. Valid formats: FQDN, IPv4 or IPv6 address, or NetBIOS name.

Note: See the examples for a specific cmdlet to determine how that cmdlet specifies the source computer name.

VMHost

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts. 

For more information about each type of host, type: "Get-Help Add-SCVMHost -detailed". See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

AddDiskSizeMB

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabytes (MB), the amount of additional disk space to add to a virtual hard disk when performing a physical-to-virtual (P2V) or virtual-to-virtual (V2V) machine conversion. Volumes located on the virtual hard disk are automatically extended to fill the entire virtual hard disk.

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

CheckForUpdate

Required? false
Accept Pipeline Input? false
Position? named
Checks the source computer for any patches required for conversion.

CPUCount

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of CPUs on a virtual machine, on a hardware profile, or on a template. See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

TYPE OF HOST   NUMBER OF PROCESSORS
------------   --------------------
Hyper-V		Up to 4 CPUs per VM; varies by guest OS
VMware ESX	 Up to 4 CPUs per VM for any supported guest OS
   Exception: 1 CPU on a VM running Windows NT 4.0
Citrix XenServer Up to 8 CPUs per VM; varies by guest OS

CPURelativeWeight

Required? false
Accept Pipeline Input? false
Position? named
Specifies the amount of CPU resources on a host that this virtual machine can use relative to other virtual machines on the same host. A virtual machine with a higher setting is allocated more CPU resources than a virtual machine with a lower setting.

TYPE OF HOST	RANGE OF RELATIVE VALUES
------------	------------------------
Hyper-V		 1 to 10000
VMware ESX	2000 = High
	1500 = Above Normal
	1000 = Normal (default)
	 750 = Below Normal
	 500 = Low
	1 to 1000000 = Custom
	The VMware term for these values is "shares."
Citrix XenServer   1 to 65536, normal is 256

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

CPUType

Required? false
Accept Pipeline Input? false
Position? named
Specifies the type of CPU for a virtual machine. To retrieve a list of all CPU types that are available for use in virtual machines in a VMM environment, type: "Get-SCCPUType"

Credential

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task. 

For more information about the PSCredential object, type: "Get-Help Get-Credential". 
For more information about Run As accounts, type: "Get-Help New-SCRunAsAccount".

DelayStartSeconds

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of seconds to wait after the virtualization service starts before automatically starting a virtual machine. This delay is used to stagger the startup time of multiple virtual machines to help reduce the demand on the physical computer’s resources. A typical setting might be 30 to 60 seconds.

TYPE OF HOST	 MAXIMUM CONFIGURABLE DELAY
------------	--------------------------------
Hyper-V		 1000000000 seconds (277777 hours)
VMware ESX		 65535 seconds	 (18 hours)
Citrix XenServer   Does not apply to XenServer virtual machines

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

DriverPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies the path to drivers for an offline physical-to-virtual machine conversion (P2V conversion).

Dynamic

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a virtual hard disk can expand dynamically. 

EnableMACAddressSpoofing

Required? false
Accept Pipeline Input? false
Position? named
Enables, when set to $True, MAC Address spoofing.

EnableVMNetworkOptimization

Required? false
Accept Pipeline Input? false
Position? named
Enables, when set to $True, virtual machine network optimization. This feature improves network performance for virtual machines with network adapters that support virtual machine queue (VMQ) or TCP Chimney Offload. VMQ enables creating a unique network queue for each virtual network adapter. TCP Chimney Offload enables network traffic processing to be offloaded from the networking stack.

Fixed

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a virtual hard disk is fixed in size. 

IDE

Required? false
Accept Pipeline Input? false
Position? named
Specifies IDE as the bus type to which to attach a virtual disk drive object or a virtual DVD drive object configured on a virtual machine or on a template.

Example format: -IDE –Bus 0 –LUN 1 

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. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LogicalNetwork

Required? false
Accept Pipeline Input? false
Position? named
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.

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

MACAddress

Required? false
Accept Pipeline Input? false
Position? named
Specifies the Media Access Control (MAC) address, or a set of MAC addresses, for a physical or virtual network adapter on a computer. Valid values are: one or more MAC addresses.

Example format for a single MAC address:
  -MACAddress “00-15-5D-B4-DC-00”

Example format for a set of MAC addresses:
  -MACAddress “00-15-5D-B4-DC-00”, “00-1A-A0-E3-75-29”

Example format for a set of MAC addresses:
  $Macs = “00-15-5D-B4-DC-00”, “00-1A-A0-E3-75-29”
  Set-SCPXEServer –MACAddress $Macs

NOTE: When used with New-SCPXEServer or Set-SCPXEServer, the MACAddress parameter updates the PXE interfaces from which the SCDM PXE Server listens for and responds to PXE requests

MACAddressType

Required? false
Accept Pipeline Input? false
Position? named
Specifies the type of MAC address to use for a virtual network adapter. Valid values are: Static, Dynamic.

MemoryMB

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabytes (MB), the amount of random access memory (RAM) on the host that is allocated to a virtual machine. The default value is 512 MB. For a virtual machine on which dynamic memory is enabled (on a host running Windows Server 2008 R2 SP1 or later), use MemoryMB to specify the startup memory value. 

TYPE OF HOSTMAXIMUM HOST MEMORY ASSIGNABLE TO VM
------------------------------------------------
Hyper-V	 Up to 65536 MB RAM per virtual machine
VMware ESX Server 3.0.x Up to 16384 MB RAM per virtual machine
VMware ESX Server 3.5.x Up to 65532 MB RAM per virtual machine
Citrix XenServer   Up to 32265 MB RAM per VM

Example format: -MemoryMB 1024

Name

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

NetworkLocation

Required? false
Accept Pipeline Input? false
Position? named
Specifies the network location for a physical network adapter or for a virtual network adapter, or changes the default network location of a host's physical network adapter.

Example formats: 
 -NetworkLocation $NetLoc ($NetLoc might contain "Corp.Contoso.com")
 -OverrideNetworkLocation $TRUE –NetworkLocation "HostNICNewLocation.Contoso.com"

NetworkTag

Required? false
Accept Pipeline Input? false
Position? named
Specifies a word or phrase to associate with a virtual network adapter that is configured to connect to a specific internal or external network on the host. The NetworkTag identifies all virtual machines with the same NetworkTag as members of the same network. VMM uses a NeworkTag (if one exists) when it evaluates hosts as possible candidates on which to deploy a virtual machine. If the host does not include virtual machines on the network with the same NetworkTag as the virtual machine to be placed, the host receives zero stars in the placement process.

NoConnection

Required? false
Accept Pipeline Input? false
Position? named
Disconnects a virtual network adapter from a virtual network.

Offline

Required? false
Accept Pipeline Input? false
Position? named
Specifies that the operation is performed offline.

OfflineDefaultGateway

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IP address of the gateway router that Windows PE uses during an offline P2V conversion. Valid formats: IPv4 or IPv6 address.

OfflineIPAddress

Required? false
Accept Pipeline Input? false
Position? named
Specifies an IPv4 or IPv6 address on the source computer that Windows PE uses during an offline P2V conversion.

REQUIRED: Use with the OfflineSubnetMask parameter (for an IPv4 address) or with the OfflinePrefixLength parameter (for an IPv4 or IPv6 address).

1. Use with the SubnetMask parameter for an IPv4 address.
	Example IPv4 format: -OfflineIPAddress 172.30.180.220 -OfflineSubnetMask 255.255.252.0

2. Use with the OfflinePrefixLength parameter for an IPv4 or IPv6 address written in CIDR notation (IPAddress/PrefixLength). 
	Example IPv4 format: -OfflineIPAddress 192.168.0.0 -OfflinePrefixLength 22

  The format above represents the IPv4 address typically written: 192.168.0.0/22 
  This represents the following range of IPv4 addresses: 192.168.0.0 - 192.168.3.255

  Example IPv6 format: -OfflineIPAddress 2001:DB8:: -OfflinePrefixLength 48

  The format above represents the IPv6 address typically written: -IPAddress 2001:DB8::/48
  This represents the following range of IPv6 addresses: 2001:DB8:0:0:0:0:0:0 - 2001:DB8:0:FFFF:FFFF:FFFF:FFFF:FFFF)

  Note: In an IPv6 address, you can use a double colon (::) to represent a series of zeros. However, the double colon can be used only once in an IPv6 address.

OfflineMACAddress

Required? false
Accept Pipeline Input? false
Position? named
Specifies the MAC address of the network interface card (NIC) on the source computer that Windows PE uses during an offline P2V conversion.

OfflinePrefixLength

Required? false
Accept Pipeline Input? false
Position? named
Specifies the length of the prefix for the IPv6 address on the source computer that Windows PE uses during an offline P2V conversion. 

Example format: -OfflineIPAddress 2001:DB8:: -OfflinePrefixLength 48

REQUIRED: Use with the OfflineIPAddress parameter to specify IPv6 address.

OfflineSubnetMask

Required? false
Accept Pipeline Input? false
Position? named
Specifies the subnet mask. For example, use OfflineSubnetMask to specify the IPv4 address on the source computer that Windows PE uses during an offline P2V conversion.

Example format: -OfflineIPAddress "192.168.100.100" –OfflineSubnetMask "255.255.255.0"

REQUIRED: Use with the OfflineIPAddress parameter to specify an IPv4 address.

OverridePatchPath

Required? false
Accept Pipeline Input? false
Position? named
For internal use only (not for use in your code).

Owner

Required? false
Accept Pipeline Input? false
Position? named
Specifies the owner of a VMM object in the form of a valid domain user account.

Example format: -Owner "Contoso\ReneeLo"
Example format: -Owner "ReneeLo@Contoso"

Path

Required? false
Accept Pipeline Input? false
Position? named
Specifies the destination path for the operation.

Example formats:
 Local path	 -Path "F:\"
 UNC path		 -Path "\\Library\Templates"
 Volume GUID path -Path "\\?\Volume{4703c1ea-8ae7-11db-b473-00123f7603e3}\"
 VMware ESX path  –Path "[storage1]\MyVMwareFolderForVMs\MyVM.vmx"
 Citrix XenServer path - Path “Local storage[99b6212f-b63d-c676-25f9-d6c460992de7]”

Wildcards are supported for "Get" cmdlets and when you specify the UNC path:

Example format:
 UNC path		 -Path "\\VMHostServer\MyVMs\*VM*"

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

SCSI

Required? false
Accept Pipeline Input? false
Position? named
Specifies SCSI as the bus type to which to attach a virtual disk drive object configured on a virtual machine or on a template. 

Example format: -SCSI -Bus 0 -LUN 0

Shutdown

Required? false
Accept Pipeline Input? false
Position? named
Indicates that a virtual machine, service, or a source server should be shut down. In the case of a virtual machine or service, the associated cmdlet attempts to use the operating system to shut the virtual machine down gracefully. In the case of a successful physical-to-virtual machine (P2V) conversion, the cmdlet shuts down the source server.

SkipInstallVirtualizationGuestServices

Required? false
Accept Pipeline Input? false
Position? named
Skips the installation of virtualization guest services on a virtual machine. By default, this parameter is set to $False and VMM installs the appropriate virtualization guest service automatically. For a virtual machine on a Hyper-V host, the virtualization guest service is called Integration Components (VMGuest.iso). For a virtual machine on a XenServer host, the virtualization guest service is called Citrix Tools for Virtual Machines (xs-tools.iso). Virtual machines on a VMware ESX host do not use a virtualization guest service. 

SourceNetworkConnectionID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the MAC address or network name of the physical network adapter to be converted into a virtual network adapter in the virtual machine.

StartAction

Required? false
Accept Pipeline Input? false
Position? named
Specifies the behavior of a virtual machine when the virtualization service (Hyper-V, VMware, or XenServer) starts. Valid values are: AlwaysAutoTurnOnVM, NeverAutoTurnOnVM, TurnOnVMIfRunningWhenVSStopped.

StartVM

Required? false
Accept Pipeline Input? false
Position? named
Specifies that the virtual machine starts when it arrives at the destination host.

StopAction

Required? false
Accept Pipeline Input? false
Position? named
Specifies the behavior of the virtual machine when the virtualization service (Hyper-V, VMware, or XenServer) stops. Valid values are: SaveVM, TurnOffVM, ShutdownGuestOS.

Trigger

Required? false
Accept Pipeline Input? false
Position? named
Starts running the commands in a job group for a physical-to-virtual (P2V) conversion, a virtual-to-virtual (V2V) conversion, or the conversion of a physical hard disk to a virtual hard disk.

UserRole

Required? false
Accept Pipeline Input? false
Position? named
Specifies a user role object.

VirtualNetwork

Required? false
Accept Pipeline Input? false
Position? named
Specifies a virtual network object.

VLanEnabled

Required? false
Accept Pipeline Input? false
Position? named
Enables a virtual LAN (VLAN) for use by virtual machines on a Hyper-V or Citrix XenServer host. 

Example format for a single VLAN: -VLANEnabled -VLANMode "Access" -VLANID 35
Example format for multiple VLANs: -VLANEnabled -VLANMode "Trunk"  -VLANTrunkID 1,2,100,200,1124

VLanID

Required? false
Accept Pipeline Input? false
Position? named
Assigns a numerical identifier in the range 1-4094 to a virtual network adapter on a virtual machine or to a physical network adapter on a virtual machine host. 

Configure a VLanID on a Hyper-V, VMware ESX, or Citrix XenServer host:
 - On an externally bound physical network adapter when the VLan mode is Access.  

Configure a VLanID on a virtual network adapter of a virtual machine:
 - Bound to a physical network adapter on the host, or
 - Bound to an internal virtual network on the host.

Example format:  -VLanEnabled
 -VLanMode "Access" -VLANID 35

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

VolumeDeviceID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the device ID of the volume to convert in a physical-to-virtual machine conversion (P2V conversion).

ComputerConfiguration

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

VMHost

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts. 

For more information about each type of host, type: "Get-Help Add-SCVMHost -detailed". See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

AddDiskSizeMB

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabytes (MB), the amount of additional disk space to add to a virtual hard disk when performing a physical-to-virtual (P2V) or virtual-to-virtual (V2V) machine conversion. Volumes located on the virtual hard disk are automatically extended to fill the entire virtual hard disk.

Bus

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IDE bus to which to attach a virtual disk drive or virtual DVD drive, or the SCSI bus to which to attach a virtual disk drive. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

CheckForUpdate

Required? false
Accept Pipeline Input? false
Position? named
Checks the source computer for any patches required for conversion.

CPUCount

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of CPUs on a virtual machine, on a hardware profile, or on a template. See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

TYPE OF HOST   NUMBER OF PROCESSORS
------------   --------------------
Hyper-V		Up to 4 CPUs per VM; varies by guest OS
VMware ESX	 Up to 4 CPUs per VM for any supported guest OS
   Exception: 1 CPU on a VM running Windows NT 4.0
Citrix XenServer Up to 8 CPUs per VM; varies by guest OS

CPURelativeWeight

Required? false
Accept Pipeline Input? false
Position? named
Specifies the amount of CPU resources on a host that this virtual machine can use relative to other virtual machines on the same host. A virtual machine with a higher setting is allocated more CPU resources than a virtual machine with a lower setting.

TYPE OF HOST	RANGE OF RELATIVE VALUES
------------	------------------------
Hyper-V		 1 to 10000
VMware ESX	2000 = High
	1500 = Above Normal
	1000 = Normal (default)
	 750 = Below Normal
	 500 = Low
	1 to 1000000 = Custom
	The VMware term for these values is "shares."
Citrix XenServer   1 to 65536, normal is 256

NOTE: See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

CPUType

Required? false
Accept Pipeline Input? false
Position? named
Specifies the type of CPU for a virtual machine. To retrieve a list of all CPU types that are available for use in virtual machines in a VMM environment, type: "Get-SCCPUType"

Credential

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task. 

For more information about the PSCredential object, type: "Get-Help Get-Credential". 
For more information about Run As accounts, type: "Get-Help New-SCRunAsAccount".

DelayStartSeconds

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of seconds to wait after the virtualization service starts before automatically starting a virtual machine. This delay is used to stagger the startup time of multiple virtual machines to help reduce the demand on the physical computer’s resources. A typical setting might be 30 to 60 seconds.

TYPE OF HOST	 MAXIMUM CONFIGURABLE DELAY
------------	--------------------------------
Hyper-V		 1000000000 seconds (277777 hours)
VMware ESX		 65535 seconds	 (18 hours)
Citrix XenServer   Does not apply to XenServer virtual machines

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

DriverPath

Required? false
Accept Pipeline Input? false
Position? named
Specifies the path to drivers for an offline physical-to-virtual machine conversion (P2V conversion).

Dynamic

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a virtual hard disk can expand dynamically. 

EnableMACAddressSpoofing

Required? false
Accept Pipeline Input? false
Position? named
Enables, when set to $True, MAC Address spoofing.

EnableVMNetworkOptimization

Required? false
Accept Pipeline Input? false
Position? named
Enables, when set to $True, virtual machine network optimization. This feature improves network performance for virtual machines with network adapters that support virtual machine queue (VMQ) or TCP Chimney Offload. VMQ enables creating a unique network queue for each virtual network adapter. TCP Chimney Offload enables network traffic processing to be offloaded from the networking stack.

Fixed

Required? false
Accept Pipeline Input? false
Position? named
Specifies that a virtual hard disk is fixed in size. 

IDE

Required? false
Accept Pipeline Input? false
Position? named
Specifies IDE as the bus type to which to attach a virtual disk drive object or a virtual DVD drive object configured on a virtual machine or on a template.

Example format: -IDE –Bus 0 –LUN 1 

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. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LogicalNetwork

Required? false
Accept Pipeline Input? false
Position? named
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.

LUN

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual DVD drive object on an IDE bus, or for a virtual disk drive object on a SCSI bus. 

Example format: -IDE -Bus 1 -LUN 0
Example format: -SCSI -Bus 0 -LUN 1

MACAddress

Required? false
Accept Pipeline Input? false
Position? named
Specifies the Media Access Control (MAC) address, or a set of MAC addresses, for a physical or virtual network adapter on a computer. Valid values are: one or more MAC addresses.

Example format for a single MAC address:
  -MACAddress “00-15-5D-B4-DC-00”

Example format for a set of MAC addresses:
  -MACAddress “00-15-5D-B4-DC-00”, “00-1A-A0-E3-75-29”

Example format for a set of MAC addresses:
  $Macs = “00-15-5D-B4-DC-00”, “00-1A-A0-E3-75-29”
  Set-SCPXEServer –MACAddress $Macs

NOTE: When used with New-SCPXEServer or Set-SCPXEServer, the MACAddress parameter updates the PXE interfaces from which the SCDM PXE Server listens for and responds to PXE requests

MACAddressType

Required? false
Accept Pipeline Input? false
Position? named
Specifies the type of MAC address to use for a virtual network adapter. Valid values are: Static, Dynamic.

MemoryMB

Required? false
Accept Pipeline Input? false
Position? named
Specifies, in megabytes (MB), the amount of random access memory (RAM) on the host that is allocated to a virtual machine. The default value is 512 MB. For a virtual machine on which dynamic memory is enabled (on a host running Windows Server 2008 R2 SP1 or later), use MemoryMB to specify the startup memory value. 

TYPE OF HOSTMAXIMUM HOST MEMORY ASSIGNABLE TO VM
------------------------------------------------
Hyper-V	 Up to 65536 MB RAM per virtual machine
VMware ESX Server 3.0.x Up to 16384 MB RAM per virtual machine
VMware ESX Server 3.5.x Up to 65532 MB RAM per virtual machine
Citrix XenServer   Up to 32265 MB RAM per VM

Example format: -MemoryMB 1024

Name

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

NetworkLocation

Required? false
Accept Pipeline Input? false
Position? named
Specifies the network location for a physical network adapter or for a virtual network adapter, or changes the default network location of a host's physical network adapter.

Example formats: 
 -NetworkLocation $NetLoc ($NetLoc might contain "Corp.Contoso.com")
 -OverrideNetworkLocation $TRUE –NetworkLocation "HostNICNewLocation.Contoso.com"

NetworkTag

Required? false
Accept Pipeline Input? false
Position? named
Specifies a word or phrase to associate with a virtual network adapter that is configured to connect to a specific internal or external network on the host. The NetworkTag identifies all virtual machines with the same NetworkTag as members of the same network. VMM uses a NeworkTag (if one exists) when it evaluates hosts as possible candidates on which to deploy a virtual machine. If the host does not include virtual machines on the network with the same NetworkTag as the virtual machine to be placed, the host receives zero stars in the placement process.

NoConnection

Required? false
Accept Pipeline Input? false
Position? named
Disconnects a virtual network adapter from a virtual network.

Offline

Required? false
Accept Pipeline Input? false
Position? named
Specifies that the operation is performed offline.

OfflineDefaultGateway

Required? false
Accept Pipeline Input? false
Position? named
Specifies the IP address of the gateway router that Windows PE uses during an offline P2V conversion. Valid formats: IPv4 or IPv6 address.

OfflineIPAddress

Required? false
Accept Pipeline Input? false
Position? named
Specifies an IPv4 or IPv6 address on the source computer that Windows PE uses during an offline P2V conversion.

REQUIRED: Use with the OfflineSubnetMask parameter (for an IPv4 address) or with the OfflinePrefixLength parameter (for an IPv4 or IPv6 address).

1. Use with the SubnetMask parameter for an IPv4 address.
	Example IPv4 format: -OfflineIPAddress 172.30.180.220 -OfflineSubnetMask 255.255.252.0

2. Use with the OfflinePrefixLength parameter for an IPv4 or IPv6 address written in CIDR notation (IPAddress/PrefixLength). 
	Example IPv4 format: -OfflineIPAddress 192.168.0.0 -OfflinePrefixLength 22

  The format above represents the IPv4 address typically written: 192.168.0.0/22 
  This represents the following range of IPv4 addresses: 192.168.0.0 - 192.168.3.255

  Example IPv6 format: -OfflineIPAddress 2001:DB8:: -OfflinePrefixLength 48

  The format above represents the IPv6 address typically written: -IPAddress 2001:DB8::/48
  This represents the following range of IPv6 addresses: 2001:DB8:0:0:0:0:0:0 - 2001:DB8:0:FFFF:FFFF:FFFF:FFFF:FFFF)

  Note: In an IPv6 address, you can use a double colon (::) to represent a series of zeros. However, the double colon can be used only once in an IPv6 address.

OfflineMACAddress

Required? false
Accept Pipeline Input? false
Position? named
Specifies the MAC address of the network interface card (NIC) on the source computer that Windows PE uses during an offline P2V conversion.

OfflinePrefixLength

Required? false
Accept Pipeline Input? false
Position? named
Specifies the length of the prefix for the IPv6 address on the source computer that Windows PE uses during an offline P2V conversion. 

Example format: -OfflineIPAddress 2001:DB8:: -OfflinePrefixLength 48

REQUIRED: Use with the OfflineIPAddress parameter to specify IPv6 address.

OfflineSubnetMask

Required? false
Accept Pipeline Input? false
Position? named
Specifies the subnet mask. For example, use OfflineSubnetMask to specify the IPv4 address on the source computer that Windows PE uses during an offline P2V conversion.

Example format: -OfflineIPAddress "192.168.100.100" –OfflineSubnetMask "255.255.255.0"

REQUIRED: Use with the OfflineIPAddress parameter to specify an IPv4 address.

OverridePatchPath

Required? false
Accept Pipeline Input? false
Position? named
For internal use only (not for use in your code).

Owner

Required? false
Accept Pipeline Input? false
Position? named
Specifies the owner of a VMM object in the form of a valid domain user account.

Example format: -Owner "Contoso\ReneeLo"
Example format: -Owner "ReneeLo@Contoso"

Path

Required? false
Accept Pipeline Input? false
Position? named
Specifies the destination path for the operation.

Example formats:
 Local path	 -Path "F:\"
 UNC path		 -Path "\\Library\Templates"
 Volume GUID path -Path "\\?\Volume{4703c1ea-8ae7-11db-b473-00123f7603e3}\"
 VMware ESX path  –Path "[storage1]\MyVMwareFolderForVMs\MyVM.vmx"
 Citrix XenServer path - Path “Local storage[99b6212f-b63d-c676-25f9-d6c460992de7]”

Wildcards are supported for "Get" cmdlets and when you specify the UNC path:

Example format:
 UNC path		 -Path "\\VMHostServer\MyVMs\*VM*"

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

SCSI

Required? false
Accept Pipeline Input? false
Position? named
Specifies SCSI as the bus type to which to attach a virtual disk drive object configured on a virtual machine or on a template. 

Example format: -SCSI -Bus 0 -LUN 0

Shutdown

Required? false
Accept Pipeline Input? false
Position? named
Indicates that a virtual machine, service, or a source server should be shut down. In the case of a virtual machine or service, the associated cmdlet attempts to use the operating system to shut the virtual machine down gracefully. In the case of a successful physical-to-virtual machine (P2V) conversion, the cmdlet shuts down the source server.

SkipInstallVirtualizationGuestServices

Required? false
Accept Pipeline Input? false
Position? named
Skips the installation of virtualization guest services on a virtual machine. By default, this parameter is set to $False and VMM installs the appropriate virtualization guest service automatically. For a virtual machine on a Hyper-V host, the virtualization guest service is called Integration Components (VMGuest.iso). For a virtual machine on a XenServer host, the virtualization guest service is called Citrix Tools for Virtual Machines (xs-tools.iso). Virtual machines on a VMware ESX host do not use a virtualization guest service. 

SourceNetworkConnectionID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the MAC address or network name of the physical network adapter to be converted into a virtual network adapter in the virtual machine.

StartAction

Required? false
Accept Pipeline Input? false
Position? named
Specifies the behavior of a virtual machine when the virtualization service (Hyper-V, VMware, or XenServer) starts. Valid values are: AlwaysAutoTurnOnVM, NeverAutoTurnOnVM, TurnOnVMIfRunningWhenVSStopped.

StartVM

Required? false
Accept Pipeline Input? false
Position? named
Specifies that the virtual machine starts when it arrives at the destination host.

StopAction

Required? false
Accept Pipeline Input? false
Position? named
Specifies the behavior of the virtual machine when the virtualization service (Hyper-V, VMware, or XenServer) stops. Valid values are: SaveVM, TurnOffVM, ShutdownGuestOS.

Trigger

Required? false
Accept Pipeline Input? false
Position? named
Starts running the commands in a job group for a physical-to-virtual (P2V) conversion, a virtual-to-virtual (V2V) conversion, or the conversion of a physical hard disk to a virtual hard disk.

UserRole

Required? false
Accept Pipeline Input? false
Position? named
Specifies a user role object.

VirtualNetwork

Required? false
Accept Pipeline Input? false
Position? named
Specifies a virtual network object.

VLanEnabled

Required? false
Accept Pipeline Input? false
Position? named
Enables a virtual LAN (VLAN) for use by virtual machines on a Hyper-V or Citrix XenServer host. 

Example format for a single VLAN: -VLANEnabled -VLANMode "Access" -VLANID 35
Example format for multiple VLANs: -VLANEnabled -VLANMode "Trunk"  -VLANTrunkID 1,2,100,200,1124

VLanID

Required? false
Accept Pipeline Input? false
Position? named
Assigns a numerical identifier in the range 1-4094 to a virtual network adapter on a virtual machine or to a physical network adapter on a virtual machine host. 

Configure a VLanID on a Hyper-V, VMware ESX, or Citrix XenServer host:
 - On an externally bound physical network adapter when the VLan mode is Access.  

Configure a VLanID on a virtual network adapter of a virtual machine:
 - Bound to a physical network adapter on the host, or
 - Bound to an internal virtual network on the host.

Example format:  -VLanEnabled
 -VLanMode "Access" -VLANID 35

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

VolumeDeviceID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the device ID of the volume to convert in a physical-to-virtual machine conversion (P2V conversion).

Examples

1: Convert a physical machine to a virtual machine.
PS C:\> $Credential = Get-Credential
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com"
PS C:\> New-SCP2V -SourceComputerName "P2VSource01.Contoso.com" -VMHost $VMHost -Name "P2VM01" -Path "D:\VirtualMachinePath" -MemoryMB 512 -Credential $Credential -RunAsynchronously
The first command uses Get-Credential to prompt you to supply a user name and password and stores your credentials in the $Credential variable. The required credentials for this operation are either a local Administrator account or a domain account with administrator rights on the computer that you want to convert. 

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

The last command performs the following operations:

- Creates a virtual machine named P2VM01 from the source physical machine named P2VSource01 in the Contoso.com domain.

- Deploys the new virtual machine on the D: drive of VMHost01 in the VirtualMachinePath folder. In this example, all of the physical disks 
  on P2VSource01.Contoso.com will be imaged and attached to the new virtual machine. 

- Assigns 512 MB of memory on the host to the new virtual machine.

- Uses $Credential to provide your credentials to New-SCP2V. 

- Uses the -RunAsynchronously parameter to return control to the shell immediately (before the command completes). 

See Also