PowerShell

Prashanth Jayaram
List the compute usage DTU

How to perform Azure SQL database Import/Export operations using PowerShell

January 14, 2021 by

In Azure, the Import/Export operation of the Azure SQL database is a vital part of the database migration methods. It is important to choose the most viable option as per the database migration strategy and business requirements. In addition, the applications that are configured with Azure SQL PaaS databases, the migration specialist could decide and identify several common scenarios where Azure PaaS database are scripted, copied, migrated, moved or backed up.

Read more »
Prashanth Jayaram
Find the version table to analyze the workflow

Different ways to login to Azure automation using PowerShell

December 22, 2020 by

PowerShell becomes a de facto toolset in the arsenal of Azure automation. PowerShell provides a platform and a friendly way of automating many repeated tasks, which in turn minimize the time-and-cost. PowerShell always comes to the rescue when there is a need for automation, and it is no different for Azure. If you are already familiar with PowerShell cmdlets, then it will be easy to be acquainted with Azure PowerShell modules. For Azure automation, Microsoft provided a set of Azure PowerShell Modules that can be leverage to manage the Azure Cloud platform.

Read more »
Prashanth Jayaram
Create Azure SQL Database using Azure portal to restore the geo backup

Quick start guide to Geo-restore in Azure SQL Database

November 24, 2020 by

Azure SQL Database—a cloud-based service model provides a platform to back up the data and ensure to keep the business up-and-running even after the disaster. The data is vital and backup of the data revolves around the process of backup, restoration, recovery, Business-Continuity-Plans (BCP), and disaster recovery (DR). In this article, we will learn:

Read more »
Prashanth Jayaram

IT Cloud Automation using PowerShell

August 17, 2020 by

Using PowerShell automation, one could easily automate the most common tasks. The future for PowerShell as the automation framework is bright. Shipping PowerShell core on the hybrid platform has opened up new markets, new customers, and new opportunities for Microsoft. At the same time, we still strongly believe in Powershell on Windows Server, Linux and macOS as a great combination for automation.

Read more »
Aveek Das
Add users to Power BI

Add users to a Power BI workspace using PowerShell

July 6, 2020 by

In this article, I am going to explain how to add users to a Power BI workspace using Power BI PowerShell. As you already know, Power BI is a business intelligence tool from Microsoft, using which we can build graphical reports and dashboards which bring some sense to our data that resides on the database. Power BI also has a web interface known as the Power BI service, which can be used to share and collaborate these reports and dashboards with multiple users within or out of the organization.

Read more »
Aveek Das
Power BI File Generated

Programmatic access to Power BI PowerShell commandlets

May 25, 2020 by

In this article, I am going to demonstrate how to access the Power BI PowerShell commandlets. In the previous article in this series, we discussed how to programmatically access the Power BI Service using the REST APIs available. PowerShell is one of the most frequently used and preferred ways of automating monotonous manual jobs and scripting those. PowerShell comes integrated with Windows, so it can be easily used from any Windows machine.

Read more »
Rajendra Gupta
Get-DbaTable DBATools command

Script SQL Server objects using DBATools

June 20, 2019 by

This article gives an overview to generate scripts for SQL Server objects with Windows PowerShell tool DBATools.

Database administrators or developers require generating scripts for SQL Server objects. We might need scripts to store a copy of object script before object change, create specific objects into other database environments such as development, UAT or non-prod environment. It is an excellent practice to keep a copy of the object before making a change to it. We can easily refer to the old script and roll back if required. Usually, we use SSMS Generate Scripts wizard to get these scripts.

Read more »
Timothy Smith
In Settings under our container in our Azure Cosmos DB, we see the options that we’ll use for our template

Creating Containers with PowerShell For Azure Cosmos DB

May 30, 2019 by

In many situations, we will develop, test or prove new concepts by horizontally scaling new SQL API containers in Azure Cosmos DB over possibly using existing containers. As we’ve seen in previous tips, we can create and remove Cosmos database accounts and databases by using the Azure Portal or PowerShell’s Az module along with making some updates to the configuration, such as the RUs for performance reasons. Similarly, we can create and remove a container through the Azure Portal along with creating and removing the container with PowerShell’s Az module.

Read more »
Timothy Smith
We see the same restrictions in the Azure Portal

Increasing or Decreasing Scale for Azure Cosmos DB

May 28, 2019 by

Now that we can create and remove an Azure Cosmos DB and databases that we can use for automation purposes, along with obtaining some information about these accounts, we’ll look at making some changes to these accounts for contexts related to performance. It’s possible that our unit and security testing or development with proof-of-concepts may face performance problems where we need to upgrade the settings of our database account. In this tip, we’ll be working with the SQL API database layer in a Cosmos database account by building on our get, create and remove automation to update its performance.

Read more »
Timothy Smith
The Azure Portal view of our SQL API database in our Azure Cosmos DB

Creating and Removing Databases with PowerShell In Azure Cosmos DB

May 27, 2019 by

Our testing or development may call for dynamic creation on the database level for Azure Cosmos DB rather than the account level. As we’ve seen with dynamically working with a Cosmos database account using PowerShell, we can create, remove, and obtain properties of the account. Identically, we can do this on the database level as well and we may use this in testing if we need the same Cosmos database account for other testing purposes. Development situations may also involve use cases where we want to test a concept and dynamically create a database within our Cosmos database account. In this tip, we’ll look at working with our Azure Cosmos database account on the database object level where we do nothing to manipulate the account itself, only add databases to the account once it’s been setup.

Read more »
Timothy Smith
We can regenerate keys in the Azure Portal for our Azure Cosmos DB

Getting and Updating Connection Information for Azure Cosmos DB

May 24, 2019 by

After we set up our Azure Cosmos DB, we may want to get, add to, or update existing properties. We may use some of the get functionality that PowerShell provides to dynamically save values to encrypted configuration files or tables that we use for application purposes and this functionality could be added to the creation of the Cosmos database account, or a separate step in addition to the creation. In secure contexts, this ensures security without the properties after passing through human eyes since they are saved directly to an encrypted location. In the same manner, we may want to regenerate the keys for the account and save the connection strings with the new keys.

Read more »
Timothy Smith
The options we see when we select the download template for automation

Creating and Removing Azure Cosmos DBs with PowerShell

May 21, 2019 by

When managing Azure Cosmos DB, we can use the Azure portal and create resources through the interface or use the command line in the portal and create resources. PowerShell also supports some functionality for creating and managing these resources, which can help development teams automate the creation of these databases for quick creations, unit and security tests, removals if the resources aren’t required following the tests. We can also use these scripts for creating templates that we may use in multi-scaling creations (like databases in a group designed for horizontal scale). Generally, in one-off situations, the Azure Portal will suffice for deployments if there is a cost to develop automation that is not required. In this tip, we’ll look at the process of creating a blank and removing the same Azure Cosmos DB.

Read more »
Timothy Smith
By querying Azure cost information, we can share with development and improve to reduce costs

Extract Azure Costs Using PowerShell

May 20, 2019 by

With strong organization and design for our development teams, cloud infrastructure and security considerations, we’ll now extract Azure cost information that we can share with our organization. In addition, we will see that we can retain this information if needed to track growth (or reduction) in costs. This step is important as it will allow our teams to have an insight into their development and it will also be another audit we can use on the security side to catch unusual growth (or significant reductions) in resource costs that may be the result of an attacker. Our ultimate goal with tracking these costs and sharing them with teams is to improve our development and possibly re-organize it as needed, giving us the ability to further reduce our spending.

Read more »