Posts

Showing posts from December, 2021

How to create a SQL Server in Windows VM in Azure with PowerShell.

The below powershell script will create a SQL Server in Azure VM. You need a subscription to to work with Azure. cls #Variables $Location = "EastUS" $ResourceGroupName = 'TestRG' #Storage $StorageName = "123456stest" $StorageSKu = "Standard_LRS" ##Network $InterfaceName = $ResourceGroupName + "ServerInterface" $NSGName = $ResourceGroupName + "nsg" $VnetName = $ResourceGroupName + "VNet" $SubnetName = "Default" $VnetAddressPrefix = '10.0.0.0/16' $VnetSubnetAddressPrefix = '10.0.0.0/24' $TCPIPAllocationMethod = "Dynamic" $DomainName = "mamillapalli" ##Compute $VMName = $ResourceGroupName + "VM" $ComputerName = $ResourceGroupName + "Server" $VmSize = "Standard_B2s" $OSDiskName = "rameshDisk" #Image $PublisherName = "MicrosoftSQLServer" $OfferName = "SQL2017-WS2016" $sku...