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-AzureQuickVM cmdlet configures and creates an Azure virtual machine.
This cmdlet can deploy a virtual machine into an existing Azure service.
This cmdlet can alternatively create an Azure service that hosts the new virtual machine.
This command creates a virtual machine that runs the Windows operating system in an existing service.
The cmdlet bases the virtual machine on the specified image.
The command specifies the WaitForBoot parameter.
Therefore, the cmdlet waits for the virtual machine to start.
Example 2: Create a virtual machine by using certificates
The first command gets certificates from a store, and stores them in the $certs variable.
The second command creates a virtual machine that runs the Windows operating system in an existing service from an image.
By default, WinRM Https listener is enabled on the virtual machine.
The command specifies the WaitForBoot parameter.
Therefore, the cmdlet waits for the virtual machine to start.
The command uploads a WinRM Certificate and X509Certificates to the hosted service.
Example 3: Create a virtual machine that runs the Linux operating system
This command creates a virtual machine that runs the Linux operating system from an image.
This command creates a service to host the new virtual machine.
The command specifies a location for the service.
Example 4: Create a virtual machine and create a service to host the new virtual machine
The first command gets locations by using the Get-AzureLocation cmdlet, and then stores them in the $Locations array variable.
The second command gets available images by using the Get-AzureVMImage cmdlet, and then stores them in the $Images array variable.
The final command creates a large virtual machine named VirtualMachine25.
The virtual machine runs the Windows operating system.
It is based on one of the images in $Images.
The command creates a service named ContosoService03 for the new virtual machine.
The service is in a location in $Locations.
Example 5: Create a virtual machine that has a reserved IP name
The first command gets locations, and then stores them in the $Locations array variable.
The second command gets available images, and then stores them in the $Images array variable.
The final command creates a virtual machine named VirtualMachine27 based on one of the images in $Images.
The command creates a service in a location in $Locations.
The virtual machine has a reserved IP name, previously stored in the $ipName variable.
Parameters
-AdminUsername
Specifies the user name of the Administrator account that this cmdlet creates on the virtual machine.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Windows
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AffinityGroup
Specifies the affinity group for the virtual machine.
Specify this parameter or the Location parameter only if this cmdlet creates an Azure service for the virtual machine.
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
-AvailabilitySetName
Specifies the name of the availability set in which this cmdlet creates the virtual machine.
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
-Certificates
Specifies a list of certificates that this cmdlet uses to create the service.
Parameter properties
Type:
CertificateSettingList
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Windows
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-CustomDataFile
Specifies a data file for the virtual machine.
This cmdlet encodes the contents of the file as Base64.
The file must be less than 64 kilobytes long.
If the guest operating system is the Windows operating system, this cmdlet saves this data as a binary file that is named %SYSTEMDRIVE%\AzureData\CustomData.bin.
If the guest operating system is Linux, this cmdlet passes the data by using the ovf-env.xml file.
Installation copies that file to the /var/lib/waagent directory.
The agent also stores the Base64 encoded data in /var/lib/waagent/CustomData.
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
-DisableGuestAgent
Indicates that this cmdlet disables the infrastructure as a service (IaaS) provision guest agent.
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
-DisableWinRMHttps
Indicates that this cmdlet disables Windows Remote Management (WinRM) on HTTPS.
By default, WinRM is enabled over HTTPS.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Windows
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DnsSettings
Specifies an array of DNS server objects that defines the DNS settings for the new deployment.
To create a DnsServer object, use the New-AzureDns cmdlet.
Indicates that this cmdlet enables WinRM over HTTP.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Windows
Position:
Named
Mandatory:
False
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:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ImageName
Specifies the name of the disk image this cmdlet uses to create the operating system disk.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
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.
Valid values 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:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Linux
Indicates that this cmdlet creates a Linux based virtual machine.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Linux
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-LinuxUser
Specifies the user name of the Linux administrative account that this cmdlet creates on the virtual machine.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Linux
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Location
Specifies the Azure datacenter that hosts the virtual machine.
If you specify this parameter, the cmdlet creates an Azure service in the specified location.
Specify this parameter or the AffinityGroup parameter only if this cmdlet creates an Azure service for the virtual machine.
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 where this cmdlet creates the virtual machines disks.
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
-Name
Specifies the name of the virtual machine that this cmdlet creates.
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
-NoExportPrivateKey
Indicates that this configuration does not upload the private key.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Windows
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NoWinRMEndpoint
Indicates that this cmdlet does not add a WinRM endpoint for the virtual machine.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Windows
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Password
Specifies the password for the administrative account.
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
-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
-ReservedIPName
Specifies the reserved IP name.
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:
True
Value from remaining arguments:
False
-ReverseDnsFqdn
Specifies the fully qualified domain name for reverse DNS look up.
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:
True
Value from remaining arguments:
False
-ServiceName
Specifies the name of a new or existing Azure service to which this cmdlet adds the new virtual machine.
If you specify a new service, this cmdlets creates it.
To create a new service, you must specify the Location or AffinityGroup parameter.
If you specify an existing service, do not specify Location or AffinityGroup.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SSHKeyPairs
Specifies SSH key pairs.
Parameter properties
Type:
SSHKeyPairList
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Linux
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SSHPublicKeys
Specifies SSH public keys.
Parameter properties
Type:
SSHPublicKeyList
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Linux
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SubnetNames
Specifies an array of names of subnet for the virtual machine.
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
-VNetName
Specifies the name of a virtual network for the virtual machine.
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
-WaitForBoot
Indicates that this cmdlet waits for the virtual machine to reach the state ReadyRole.
If the virtual machine reaches one of the following states, the cmdlet fails: FailedStartingVM, ProvisioningFailed, or ProvisioningTimeout.
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
-Windows
Indicates that this cmdlet creates a Windows virtual machine.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Windows
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WinRMCertificate
Specifies a certificate that this cmdlet associates to a WinRM endpoint.
Parameter properties
Type:
X509Certificate2
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Windows
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-X509Certificates
Specifies an array of X509 certificates that are deployed to a hosted service.
Parameter properties
Type:
X509Certificate2[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Windows
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.