Tag Archives: Powershell

How to Point in time Restore Azure SQL Database after deleting the database

Azure SQL Database has feature to restore the database to point in time when the database is live. When we have to move the database to different Server we end up deleting the database from old server, we can not … Continue reading

Posted in Azure, Powershell, SQL, SQL Server, Uncategorized | Tagged , , , , | 2 Comments

Powershell Workflow for Runbooks, Inline Script

Powershell workflow is the best way to program parallel processing using Powershell and/or in Azure run books. Though the syntax is similar, there are few differences you need to be aware of. Start with below link when you create your … Continue reading

Posted in Azure, Powershell, Uncategorized | Tagged , , , , , , | Leave a comment

DBATools.IO – Powershell for SQL DBAs

DBATools.IO was one of the best things I started using in 2017 and I wanted to master this in 2018! https://dbatools.io/functions/ includes the list of all commands in dbatools module! Start using it if you have not started already.

Posted in Powershell, SQL, Uncategorized | Tagged , , | Leave a comment

Azure Scripting errors after upgrading Powershell to V4 – Select-AzureRmProfile / Save-AzureRmProfile

After upgrading Powershell to V4, few of my scripts started failing. Few updated commandlets are missing backward compatibility, Select-AzureRmProfile/ Save-AzureRmProfile are couple of the broken commandlets. You can replace them with Import-AzureRmContext, and Save-AzureRmContext. Code block I use for reference: … Continue reading

Posted in Azure, Powershell, SQL Server, Uncategorized | Tagged , , , , , | Leave a comment

Powershell commands – my quick reference

Posted in Learn_Powershell, Powershell, Productivity, Uncategorized | Tagged | Leave a comment

Windows Server storage capacity and usage report using Powershell

Below Scrip generates list of all Drives and mount points configured, thery storage capacity and free space. Following Script to check the storage on a single server; If you want to calculate the storage to be added to maintain certain … Continue reading

Posted in Powershell, Productivity, Uncategorized, Windows Server | Tagged , , , , | Leave a comment

Generate SQL Query for Database Snapshot creation using Powershell

Following PowerShell script generates SQL Query to take a snapshot;

Posted in Powershell, Productivity, SQL, Uncategorized | Tagged , , , , | Leave a comment