New-AzSqlVM

Creates a new sql virtual machine.

Syntax

New-AzSqlVM
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-LicenseType] <String>
   -Location <String>
   [-AsJob]
   [-Offer <String>]
   [-Sku <String>]
   [-SqlManagementType <String>]
   [-Tag <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSqlVM
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-SqlVM] <AzureSqlVMModel>
   -Location <String>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzSqlVM cmdlet creates an Azure SQL virtual machine.

Examples

Example 1

New-AzSqlVM -ResourceGroupName ResourceGroup01 -Name vm -LicenseType 'PAYG' -Sku Developer

Name ResourceGroupName  LicenseType Sku       Offer          SqlManagementType
---- -----------------  ----------- ---       -----          -----------------
vm   ResourceGroup01	PAYG        Developer SQL2017-WS2016 Full

Creates a new Azure SQL virtual machine with name vm in the resource group ResourceGroup01

Parameters

-AsJob

Run cmdlet in the background.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-LicenseType

SQL virtual machine license type.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Location

SQL virtual machine location.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Name

SQL virtual machine name.

Type:String
Aliases:SqlVMName
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Offer

SQL virtual machine offer.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Sku

SQL virtual machine edition type.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-SqlManagementType

SQL virtual machine management type.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-SqlVM

SQL virtual machine object.

Type:AzureSqlVMModel
Position:2
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-Tag

The tags to associate with the SQL virtual machine

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

AzureSqlVMModel

Outputs

AzureSqlVMModel