New-AzureQuickVM
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
New-AzureQuickVM
Creates and provisions a new Azure virtual machine.
Syntax
Parameter Set: Windows
New-AzureQuickVM -ImageName <String> -ServiceName <String> -Windows [-AdminUsername <String> ] [-AffinityGroup <String> ] [-AvailabilitySetName <String> ] [-Certificates <CertificateSettingList> ] [-CustomDataFile <String> ] [-DisableGuestAgent] [-DisableWinRMHttps] [-DnsSettings <DnsServer[]> ] [-EnableWinRMHttp] [-HostCaching <String> ] [-InstanceSize <String> ] [-Location <String> ] [-MediaLocation <String> ] [-Name <String> ] [-NoExportPrivateKey] [-NoWinRMEndpoint] [-Password <String> ] [-ReservedIPName <String> ] [-ReverseDnsFqdn <String> ] [-SubnetNames <String[]> ] [-VNetName <String> ] [-WaitForBoot] [-WinRMCertificate <X509Certificate2> ] [-X509Certificates <X509Certificate2[]> ] [ <CommonParameters>]
Parameter Set: Linux
New-AzureQuickVM -ImageName <String> -Linux -ServiceName <String> [-AffinityGroup <String> ] [-AvailabilitySetName <String> ] [-CustomDataFile <String> ] [-DisableGuestAgent] [-DnsSettings <DnsServer[]> ] [-HostCaching <String> ] [-InstanceSize <String> ] [-LinuxUser <String> ] [-Location <String> ] [-MediaLocation <String> ] [-Name <String> ] [-Password <String> ] [-ReservedIPName <String> ] [-ReverseDnsFqdn <String> ] [-SSHKeyPairs <SSHKeyPairList> ] [-SSHPublicKeys <SSHPublicKeyList> ] [-SubnetNames <String[]> ] [-VNetName <String> ] [-WaitForBoot] [ <CommonParameters>]
Detailed Description
This topic describes the cmdlet in the 0.8.10 version of the Microsoft Azure PowerShell module. To get the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version.
The New-AzureQuickVM cmdlet sets the configuration for a new virtual machine and creates the virtual machine. You can create a new Azure service for the virtual machine by specifying either the Location or AffinityGroup parameters, or deploy the new virtual machine into an existing service.
Parameters
-AdminUsername<String>
Specifies the name for the administrative account to create.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-AffinityGroup<String>
Specifies the Azure affinity group the virtual machine will reside in. Only valid for a new cloud service.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-AvailabilitySetName<String>
Specify the availability set to use.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Certificates<CertificateSettingList>
Specifies a certificate list to use for creating the service.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-CustomDataFile<String>
Specifies the name of a data file. This cmdlet base-64 encodes the contents of the file and sends it with the provisioning configuration information. The file must be less than 64KB or the Azure API will not accept the request. On Windows, this data ends up in %SYSTEMDRIVE%\AzureData\CustomData.bin as a binary file. On Linux, this data is passed to the virtual machine by means of the ovf-env.xml file, which is copied to the /var/lib/waagent directory during provisioning. The agent also places the base-64 encoded data in /var/lib/waagent/CustomData during provisioning.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DisableGuestAgent
Indicates that this cmdlet disables the IaaS provision guest agent.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DisableWinRMHttps
Disables the Windows Remote Management (WinRM) service on https, instead of enabling it by default.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DnsSettings<DnsServer[]>
Specifies a DNS Server object that defines the DNS settings for the new deployment. Use New-AzureDNS to create the DNS server object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EnableWinRMHttp
Enables the Windows Remote Management (WinRM) service on http.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-HostCaching<String>
Specifies the host caching mode to use. Supported options are: "ReadOnly" and "ReadWrite".
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ImageName<String>
Specifies the name of the operating system image to use to create the operating system disk.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-InstanceSize<String>
Specifies the size of the instance. For a list of virtual machine sizes, see Virtual Machine and Cloud Service Sizes for Azure.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Linux
Creates a Linux virtual machine.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-LinuxUser<String>
Specifies the Linux administrative account name to create.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Location<String>
Specifies the Azure data center location that will host the virtual machine. When specified, New-AzureQuickVM creates a new Azure service in the specified location. Only valid for a new cloud service.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-MediaLocation<String>
Specifies the Azure storage location to use for the virtual machine’s disks.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the name of the virtual machine.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-NoExportPrivateKey
Prevents the private key from being uploaded.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-NoWinRMEndpoint
Prevents the WinRM endpoint from being added.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Password<String>
Specifies the password for the administrative account.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ReservedIPName<String>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-ReverseDnsFqdn<String>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-ServiceName<String>
Specifies the new or existing service name.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SSHKeyPairs<SSHKeyPairList>
Specifies a list of SSH key pairs already deployed in the subscription to deploy in the virtual machine.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SSHPublicKeys<SSHPublicKeyList>
Specifies a list of SSH public keys already deployed in the subscription to deploy in the virtual machine.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SubnetNames<String[]>
Specifies a list of subnet names the virtual machine will use.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VNetName<String>
Specifies the name of the virtual network that you want the virtual machine to use.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WaitForBoot
Waits for the virtual machine to reach the ReadyRole state. The command fails if a virtual machine enters one of the following states while the command waits:"FailedStartingVM," "ProvisioningFailed," or "ProvisioningTimeout".
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Windows
Creates a Windows virtual machine.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WinRMCertificate<X509Certificate2>
Specifies a certificate that will be associated with WinRM endpoint.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-X509Certificates<X509Certificate2[]>
Specifies X509 certificates that will be deployed to the cloud service.
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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).
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.
Examples
Example 1
This example creates a new Windows virtual machine in an existing service from an image. (Use Get-AzureVMImage to get a list of images.)
C:\PS>New-AzureQuickVM –Windows –ServiceName "MySvc1" –name "MyWinVM1" –ImageName $image –Password $adminPasswd
Example 2
This example creates a new Linux virtual machine from an image, and creates a new service to host it.
C:\PS> New-AzureQuickVM –Linux –ServiceName "MySvc2" –name "MyLxVM1" –ImageName $image –LinuxUser $user –Password $adminPasswd –Location $dclocation
Example 3
This example gets a list of data center locations and a list of virtual machine images, and then creates a new large Windows virtual machine and a new service.
C:\PS> $dclocations = Get-AzureLocationC:\PC> $images = Get-AzureVMImageC:\PS> New-AzureQuickVM –Windows –InstanceSize "Large" –ServiceName "MySvc3" –name "MyWinVM1" –ImageName $images[4].imagename –Password $adminPasswd –location $dclocations[0].name