PowerShell Logo Small

New-VM



This is the built-in help made by Microsoft for the command 'New-VM', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates a new virtual machine.

SYNTAX


New-VM [[-Name] <String>] [[-MemoryStartupBytes] <Int64>] [-AsJob] [-BootDevice <BootDevice>] [-ComputerName <String[]>] [-NoVHD] [-Path
<String>] [-SwitchName <String>] [-Confirm] [-WhatIf] [<CommonParameters>]
New-VM [[-Name] <String>] [[-MemoryStartupBytes] <Int64>] [-AsJob] [-BootDevice <BootDevice>] [-ComputerName <String[]>] [-Path <String>]
[-SwitchName <String>] -NewVHDPath <String> -NewVHDSizeBytes <UInt64> [-Confirm] [-WhatIf] [<CommonParameters>]
New-VM [[-Name] <String>] [[-MemoryStartupBytes] <Int64>] [-AsJob] [-BootDevice <BootDevice>] [-ComputerName <String[]>] [-Path <String>]
[-SwitchName <String>] -VHDPath <String> [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-VM cmdlet creates a new virtual machine.



<

RELATED LINKS






REMARKS

<

Examples


Example 1

PS C:\>New-VM –Name “new 1” –MemoryStartupBytes 512MB



This example creates a new virtual machine named new 1 that has 512 MB of memory.




Example 2

PS C:\>New-VM –Name “new 2” –MemoryStartupBytes 1GB –NewVHDPath d:\vhd\base.vhdx



This example creates a virtual machine named new 2 that has 1 GB of memory and that is connected to a new 40 GB virtual hard disk that uses
the VHDX format.




Example 3

PS C:\>New-VM –Name “new 3” –MemoryStartupBytes 1GB –VHDPath d:\vhd\BaseImage.vhdx



This example creates a virtual machine named new 3 that has 1 GB of memory and connects it to an existing virtual hard disk that uses the VHDX
format.