Skip to Content
Learning Microsoft Azure Storage
book

Learning Microsoft Azure Storage

by Mohamed Waly
November 2017
Intermediate to advanced
276 pages
7h 6m
English
Packt Publishing
Content preview from Learning Microsoft Azure Storage

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-SecureString -String $Password -AsPlainText -Force))

Once you are done with the SQL Server, you can create the database on it:

New-AzureRmSqlDatabase ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Azure Storage - The Complete Guide

Microsoft Azure Storage - The Complete Guide

Vijay Saini
Learning Microsoft Azure

Learning Microsoft Azure

Jonah Carrio Andersson

Publisher Resources

ISBN: 9781785884917Other