Export (0) Print
Expand All

New-SCP2V

New-SCP2V

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

Syntax

Parameter Set: __AllParameterSets
New-SCP2V -VMHost <Host> [-AddDiskSizeMB <UInt64> ] [-Bus <Byte> ] [-CheckForUpdate] [-CPUCount <Byte> ] [-CPURelativeWeight <Int32> ] [-CPUType <ProcessorType> ] [-Credential <PSCredential> ] [-DelayStartSeconds <Int32> ] [-Description <String> ] [-DriverPath <String> ] [-Dynamic] [-EnableMACAddressSpoofing <Boolean> ] [-EnableVMNetworkOptimization <Boolean> ] [-Fixed] [-IDE] [-JobGroup <Guid> ] [-JobVariable <String> ] [-LogicalNetwork <LogicalNetwork> ] [-LUN <Byte> ] [-MACAddress <String> ] [-MACAddressType <String> ] [-MemoryMB <Int32> ] [-Name <String> ] [-NetworkLocation <String> ] [-NetworkTag <String> ] [-NoConnection] [-Offline] [-OfflineDefaultGateway <String> ] [-OfflineIPAddress <String> ] [-OfflineMACAddress <String> ] [-OfflinePrefixLength <String> ] [-OfflineSubnetMask <String> ] [-OverridePatchPath <String> ] [-Owner <String> ] [-Path <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-SCSI] [-Shutdown] [-SkipInstallVirtualizationGuestServices] [-SourceNetworkConnectionID <String> ] [-StartAction <VMStartAction> {NeverAutoTurnOnVM | AlwaysAutoTurnOnVM | TurnOnVMIfRunningWhenVSStopped} ] [-StartVM] [-StopAction <VMStopAction> {SaveVM | TurnOffVM | ShutdownGuestOS} ] [-Trigger] [-UserRole <UserRole> ] [-VirtualNetwork <VirtualNetwork> ] [-VLanEnabled <Boolean> ] [-VLanID <UInt16> ] [-VMMServer <ServerConnection> ] [-VMNetwork <VMNetwork> ] [-VolumeDeviceID <String> ] [ <CommonParameters>]

Parameter Set: Install
New-SCP2V -SourceComputerName <String> -VMHost <Host> [-AddDiskSizeMB <UInt64> ] [-Bus <Byte> ] [-CheckForUpdate] [-CPUCount <Byte> ] [-CPURelativeWeight <Int32> ] [-CPUType <ProcessorType> ] [-Credential <PSCredential> ] [-Description <String> ] [-DriverPath <String> ] [-Dynamic] [-EnableMACAddressSpoofing <Boolean> ] [-EnableVMNetworkOptimization <Boolean> ] [-Fixed] [-IDE] [-JobGroup <Guid> ] [-JobVariable <String> ] [-LogicalNetwork <LogicalNetwork> ] [-LUN <Byte> ] [-MACAddress <String> ] [-MACAddressType <String> ] [-MemoryMB <Int32> ] [-Name <String> ] [-NetworkLocation <String> ] [-NetworkTag <String> ] [-NoConnection] [-Offline] [-OfflineDefaultGateway <String> ] [-OfflineIPAddress <String> ] [-OfflineMACAddress <String> ] [-OfflinePrefixLength <String> ] [-OfflineSubnetMask <String> ] [-OverridePatchPath <String> ] [-Owner <String> ] [-Path <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-SCSI] [-Shutdown] [-SkipInstallVirtualizationGuestServices] [-SourceNetworkConnectionID <String> ] [-StartVM] [-Trigger] [-UserRole <UserRole> ] [-VirtualNetwork <VirtualNetwork> ] [-VLanEnabled <Boolean> ] [-VLanID <UInt16> ] [-VMMServer <ServerConnection> ] [-VMNetwork <VMNetwork> ] [-VolumeDeviceID <String> ] [ <CommonParameters>]

Parameter Set: NoInstall
New-SCP2V -ComputerConfiguration <MachineConfiguration> -VMHost <Host> [-AddDiskSizeMB <UInt64> ] [-Bus <Byte> ] [-CheckForUpdate] [-CPUCount <Byte> ] [-CPURelativeWeight <Int32> ] [-CPUType <ProcessorType> ] [-Credential <PSCredential> ] [-Description <String> ] [-DriverPath <String> ] [-Dynamic] [-EnableMACAddressSpoofing <Boolean> ] [-EnableVMNetworkOptimization <Boolean> ] [-Fixed] [-IDE] [-JobGroup <Guid> ] [-JobVariable <String> ] [-LogicalNetwork <LogicalNetwork> ] [-LUN <Byte> ] [-MACAddress <String> ] [-MACAddressType <String> ] [-MemoryMB <Int32> ] [-Name <String> ] [-NetworkLocation <String> ] [-NetworkTag <String> ] [-NoConnection] [-Offline] [-OfflineDefaultGateway <String> ] [-OfflineIPAddress <String> ] [-OfflineMACAddress <String> ] [-OfflinePrefixLength <String> ] [-OfflineSubnetMask <String> ] [-OverridePatchPath <String> ] [-Owner <String> ] [-Path <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-SCSI] [-Shutdown] [-SkipInstallVirtualizationGuestServices] [-SourceNetworkConnectionID <String> ] [-StartVM] [-Trigger] [-UserRole <UserRole> ] [-VirtualNetwork <VirtualNetwork> ] [-VLanEnabled <Boolean> ] [-VLanID <UInt16> ] [-VMMServer <ServerConnection> ] [-VMNetwork <VMNetwork> ] [-VolumeDeviceID <String> ] [ <CommonParameters>]




Detailed Description

The New-SCP2V cmdlet converts a physical machine to a virtual machine on a Hyper-V host managed by 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.

Parameters

-AddDiskSizeMB<UInt64>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Bus<Byte>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CheckForUpdate

Checks the source computer for any patches required for conversion.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerConfiguration<MachineConfiguration>

Specifies a computer configuration object.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-CPUCount<Byte>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CPURelativeWeight<Int32>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CPUType<ProcessorType>

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"


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

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".


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-DelayStartSeconds<Int32>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Description<String>

States a description for the specified object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DriverPath<String>

Specifies the path to drivers for an offline physical-to-virtual machine conversion (P2V conversion).


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Dynamic

Specifies that a virtual hard disk can expand dynamically.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EnableMACAddressSpoofing<Boolean>

Enables, when set to $True, MAC Address spoofing.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EnableVMNetworkOptimization<Boolean>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Fixed

Specifies that a virtual hard disk is fixed in size.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IDE

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobGroup<Guid>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LogicalNetwork<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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LUN<Byte>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MACAddress<String>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MACAddressType<String>

Specifies the type of MAC address to use for a virtual network adapter. Valid values are: Static, Dynamic.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MemoryMB<Int32>

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 HOST MAXIMUM 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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NetworkLocation<String>

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"


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NetworkTag<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NoConnection

Disconnects a virtual network adapter from a virtual network.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Offline

Specifies that the operation is performed offline.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OfflineDefaultGateway<String>

Specifies the IP address of the gateway router that Windows PE uses during an offline P2V conversion. Valid formats: IPv4 or IPv6 address.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OfflineIPAddress<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OfflineMACAddress<String>

Specifies the MAC address of the network interface card (NIC) on the source computer that Windows PE uses during an offline P2V conversion.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OfflinePrefixLength<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OfflineSubnetMask<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OverridePatchPath<String>

For internal use only (not for use in your code).


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Owner<String>

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"


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

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*"


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SCSI

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Shutdown

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SkipInstallVirtualizationGuestServices

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SourceComputerName<String>

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.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SourceNetworkConnectionID<String>

Specifies the MAC address or network name of the physical network adapter to be converted into a virtual network adapter in the virtual machine.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StartAction<VMStartAction>

Specifies the behavior of a virtual machine when the virtualization service (Hyper-V, VMware, or XenServer) starts. Valid values are: AlwaysAutoTurnOnVM, NeverAutoTurnOnVM, TurnOnVMIfRunningWhenVSStopped.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StartVM

Specifies that the virtual machine starts when it arrives at the destination host.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StopAction<VMStopAction>

Specifies the behavior of the virtual machine when the virtualization service (Hyper-V, VMware, or XenServer) stops. Valid values are: SaveVM, TurnOffVM, ShutdownGuestOS.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Trigger

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserRole<UserRole>

Specifies a user role object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualNetwork<VirtualNetwork>

Specifies a virtual network object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VLanEnabled<Boolean>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VLanID<UInt16>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMHost<Host>

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.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMNetwork<VMNetwork>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VolumeDeviceID<String>

Specifies the device ID of the volume to convert in a physical-to-virtual machine conversion (P2V conversion).


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • VirtualMachine

Examples

1: Convert a physical machine to a virtual machine.

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).


PS C:\> $Credential = Get-CredentialPS 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

Related topics


Add-SCPatch

New-SCComputerConfiguration

Remove-SCComputerConfiguration

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft