Reader small image

You're reading from  Learning Microsoft Azure Storage

Product typeBook
Published inNov 2017
PublisherPackt
ISBN-139781785884917
Edition1st Edition
Tools
Right arrow

Automating the tasks

As usual, at the end of each chapter, we get our hands dirty with automation.

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...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning Microsoft Azure Storage
Published in: Nov 2017Publisher: PacktISBN-13: 9781785884917