This article is focused on creating an Azure SQL Server to a newly created Resource Group and then creating a SQL Database of Basic Edition with DTU capacity with its TDE (Transparent Data Encryption) state as Enabled using PowerShell commands
This article is divided into following 5 sections.
- Connecting to Azure
- Creating a new Resource Group
- Creating SQL Server to the Resource Group created from Step 3
- Creating Basic Edition SQL Database
- Checking if TDE State is already enabled, if not, setting the TDE State to Enabled
For running the PowerShell commands, make sure you have AzResources Module installed, if not then run the following command to install it to your local system
PS Script: Install-Module -Name Az.Resources
Once the Module is installed, now it’s time to follow the 5 steps mentioned above,
Below mentioned all the 5 steps in detail with the PowerShell scripts,
Now, let's verify if the script has run perfectly or not by checking it
Navigate to https://portal.azure.com -> Resource Group -> Created Resource Group -> You will find the created SQL Server -> In the SQL Server -> SQL Database -> Transparent Data Encryption -> It should be set as Enabled
![Create Azure SQL Server and DTU based SQL Database with TDE State Enabled using PowerShell script]()
Fig 1.1 – SQL Server Provisioned
![Create Azure SQL Server and DTU based SQL Database with TDE State Enabled using PowerShell script]()
Fig 1.2 – SQL Database of Basic Edition provisioned In the SQL Server
![Create Azure SQL Server and DTU based SQL Database with TDE State Enabled using PowerShell script]()
Fig 1.3 – TDE state is Enabled in the SQL Database
I hope this article seems useful for all the Azure enthusiasts on how they can provision SQL Server and SQL Database using PowerShell scripts.
Keep Learning!
Keep Sharing!