New-WAPackQuickVM
Creates a virtual machine based on a template.
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.
Syntax
New-WAPackQuickVM
-Name <String>
-Template <VMTemplate>
-VMCredential <PSCredential>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
These topics are deprecated and will be removed in the future.
This topic describes the cmdlet in the 0.8.1 version of the Microsoft Azure PowerShell module.
To find out the version of the module you're using, from the Azure PowerShell console, type (Get-Module -Name Azure).Version
.
The New-WAPackQuickVM cmdlet creates a virtual machine based on a template.
Examples
Example 1: Create a virtual machine based on a template
PS C:\> $Credentials = Get-Credential
PS C:\> $TemplateId = Get-WAPackVMTemplate -Id 00001111-aaaa-2222-bbbb-3333cccc4444
PS C:\> New-WAPackQuickVM -Name "VirtualMachine023" -Template $TemplateId -VMCredential $Credentials
The first command creates a PSCredential object, and then stores it in the $Credentials variable.
The cmdlet prompts you for an account and password.
For more information, type Get-Help Get-Credential
.
The second command gets a template by using the Get-WAPackVMTemplate cmdlet. The command specifies the ID of a template. The command stores the template object in the $TemplateID variable.
The final command creates a virtual machine named VirtualMachine023. The command bases the virtual machine on the template stored in $TemplateId.
Parameters
-Name
Specifies a name for the virtual machine.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Template
Specifies a template. The cmdlet creates a virtual machine based on the template that you specify. To obtain a template object, use the Get-WAPackVMTemplate cmdlet.
Type: | VMTemplate |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMCredential
Specifies the credential for the local Administrator account.
To obtain a PSCredential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential
.
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |