As usual, at the end of each chapter, we get our hands dirty with automation.
Automating the tasks
Creating an Azure SQL Database using PowerShell
First off, you will have to create the SQL Server on which the database will be built, and since the SQL Server needs an admin name and a password, they will be created and stored in variables:
$SQLAdmin = “SQL Admin User Name”
$Password = “SQL Admin Password”
Then, you can work on creating the SQL Server with the following cmdlets:
New-AzureRmSqlServer -ResourceGroupName PacktPub -ServerName packtpubsqlps -Location WestEurope -SqlAdministratorCredentials $(New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $SQLAdmin,$(ConvertTo...