Skip to content

Commit 67be8cb

Browse files
authored
Update sql-agent-extension-manually-register-single-vm.md
--Add the mandatory parameters on the Powershell command to register in FULL mode -- Add the separator for Azure CLI
1 parent 34e36c1 commit 67be8cb

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

articles/azure-sql/virtual-machines/windows/sql-agent-extension-manually-register-single-vm.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,29 @@ Register-AzResourceProvider -ProviderNamespace Microsoft.SqlVirtualMachine
8585

8686
## Full mode
8787

88-
To register your SQL Server VM directly in full mode, use the following Azure PowerShell command:
88+
To register your SQL Server VM directly in full mode
89+
90+
# [Azure CLI](#tab/bash)
91+
92+
Register a SQL Server VM in FULL mode with the Azure CLI:
93+
94+
```azurecli-interactive
95+
# Register Enterprise or Standard self-installed VM in Lightweight mode
96+
az sql vm create --name <vm_name> --resource-group <resource_group_name> --location <vm_location> --license-type <license_type> --sql-mgmt-type Full
97+
```
98+
99+
# [Azure PowerShell](#tab/powershell)
100+
101+
Register a SQL Server VM in FULL mode with Azure PowerShell:
89102

90103
```powershell-interactive
91104
# Get the existing Compute VM
92105
$vm = Get-AzVM -Name <vm_name> -ResourceGroupName <resource_group_name>
93106
94107
# Register with SQL IaaS Agent extension in full mode
95-
New-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -SqlManagementType Full
108+
New-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -Location $vm.Location `
109+
-LicenseType <license_type> -SqlManagementType Full
110+
96111
97112
```
98113

0 commit comments

Comments
 (0)