Cloud solutions has been gaining increased support and many customers moving their data on to cloud technologies or planning to move in future. Another technology which has gained a lot of popularity in recent days in use of powershell. Not just Microsoft, but all organizations using the Microsoft technologies is making use of powershell to automate and administer different software products which reduces the amount of time to perform repeated tasks manually, instead we can just run required powershell script or even automate the powershell script through a job which completely reduces the manual intervention thus freeing up time of administrators to focus on other priority tasks. Microsoft also has various powershell command-lets which can be used to create, configure, manage or administer SQL Azure on Microsoft Azure VMs.
To be able to use Azure powershell command-lets we need to first install the Azure PowerShell modules, which will enable the usage of using Azure cmdlets. Once the Azure PowerShell modules is installed, next is to connect to an Azure account using PowerShell, so that we can run the Azure com-lets. Some of the important tasks that can be performed for creating, configuring and managing SQL Server on Azure VM include Selecting an Azure Subscription using Get-AzureSubscription, Creating or Identifying an Azure Storage Account using Get-AzureStorageAccount, create a new Azure Storage account New-AzureStorageAccount, Creating a New Azure Cloud Service using New-AzureService –ServiceName, Identifying the SQL Server Image To Be Provisioned using Get-AzureVMImage, Identifying the Azure VM Size To Be Provisioned using Get-AzureRoleSize, Provisioning a SQL Server Image VM using New-AzureQuickVM. Also Post Deployment Configuration of Provisioned SQL Server VM like Attaching Data Disks using Add-AzureDataDisk, Adding TCP/IP Endpoints for SQL Server Listener using Add-AzureEndpoint, etc.
Powershell is great way to automate things and reduce manual intervention, which will greatly reduce the costs further by reducing the time spent by DBAs, Windows or Azure management teams who are responsible to deal with moving SQL Server and other applications on to Microsoft Azure. However, it is important to note that there will be various parameters available and requires good amount of homework, testing to be able to come with correct values suiting our requirement. To use this DBAs and other admins need some understanding of using powershell to be able to write the powershell code. Initially it may look tough to learn powershell scripting, but it is far easy compared to learning other scripting technologies.
Hope this was helpful.
This is applicable for below versions of SQL Server
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014
SQL Server 2016
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, Frequently asked questions, SQL Server Trainings