Creates an Azure virtual machine configuration object.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use
Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating
new resources since ASM is scheduled for retirement. For more information, see
Azure Service Manager retirement.
The Az PowerShell module is the recommended
PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
The New-AzureVMConfig cmdlet creates an Azure virtual machine configuration object.
You can use this object to perform a new deployment and add a new virtual machine to an existing deployment.
Examples
Example 1: Create a Windows virtual machine configuration
This command creates a Windows virtual machine configuration with operating system disk, data disk and provisioning configuration.
This configuration is then used to create a new virtual machine.
Example 2: Create a Linux virtual machine configuration
This command creates a new Linux virtual machine configuration with operating system disk, data disk and provisioning configuration.
This configuration is then used to create a new virtual machine.
Parameters
-AvailabilitySetName
Specifies the name of the availability set.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
3
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DisableBootDiagnostics
Indicates that the configuration disables boot diagnostics.
By default, boot diagnostics are enabled on the virtual machine.
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
-DiskLabel
Specifies a label for the operating system disk.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ImageName
Position:
7
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DiskName
Specifies a name for the operating system disk.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DiskName
Position:
5
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-HostCaching
Specifies the host caching mode for the operating system disk.
Valid values are:
ReadOnly
ReadWrite
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
2
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ImageName
Specifies the name of the virtual machine image to use for the operating system disk.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ImageName
Position:
5
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InformationAction
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
Continue
Ignore
Inquire
SilentlyContinue
Stop
Suspend
Parameter properties
Type:
ActionPreference
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
infa
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InformationVariable
Specifies an information variable.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
iv
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InstanceSize
Specifies the size of the instance.
The acceptable values for this parameter are:
ExtraSmall
Small
Medium
Large
ExtraLarge
A5
A6
A7
A8
A9
Basic_A0
Basic_A1
Basic_A2
Basic_A3
Basic_A4
Standard_D1
Standard_D2
Standard_D3
Standard_D4
Standard_D11
Standard_D12
Standard_D13
Standard_D14
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
1
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Label
Specifies a label to assign to the virtual machine.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
4
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-LicenseType
Specifies the type of license for an image or disk that is licensed on-premises.
The acceptable values for this parameter are:
Windows_Client
Windows_Server
Specify this parameter only for images that contain the Windows Server operating system.
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
-MediaLocation
Specifies the Azure storage location for the new virtual machine disk.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ImageName
Position:
6
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Name
Specifies the name of the virtual machine.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Profile
Specifies the Azure profile from which this cmdlet reads.
If you do not specify a profile, this cmdlet reads from the local default profile.
Parameter properties
Type:
AzureSMProfile
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.