27 Working in the cloud

 

To answer your burning cloud question: as of this writing, dbatools has limited support for cloud database services, and the support that we do provide is focused on Microsoft Azure. This is primarily because most of the core programmers on the dbatools team have access to Microsoft Azure, whereas our access to other cloud providers is limited. We are, however, open to community contributions for other cloud providers.

If you have SQL Server installed on a virtual machine on any cloud provider, including Amazon Web Services (AWS), Google Cloud Platform (GCP), Microsoft Azure, or other leading clouds, SQL Server will work pretty much like it does on-premises. Specialized database services such as Amazon’s Relational Database Service (RDS) or Microsoft’s Azure SQL Database and Managed Instances, however, do not behave in entirely the same manner as on-premises and require specialized programming to support them within PowerShell.

We do have plans to provide more in-depth Azure SQL Database support, and we’ll likely see this in an entirely new module that makes Microsoft’s Az.Sql as easy and fun to use as dbatools. Until then, this chapter will outline some of the ways that dbatools is currently being used in Microsoft Azure, and what we’ve done to ensure you can use a few fundamental commands within our toolset.

27.1 Connecting to Azure

27.2 Service principals and access tokens

27.2.1 Using Az.Accounts

27.3 Supported commands

27.4 The future

27.5 Hands-on lab