Category: PowerShell

Creating a PowerShell Module from a DBA’s Perspective

Problem The last T-SQL Tuesday a lot of data professionals shared their favorite PowerShell scripts including functions, but some DBAs are new to PowerShell and don’t know how to use the functions.  So this post will cover how to create a PowerShell module so you can store the functions you just found that are useful …

Read More “Creating a PowerShell Module from a DBA’s Perspective”

T-SQL Tuesday #94 – Automation Through PowerShell Checking the Status of AGs

This month Rob Sewell (Twitter | Blog) is hosting T-SQL Tuesday and wants us to automate more with PowerShell or at least learn PowerShell. My favorite thing to automate using PowerShell is checking on the status of things on multiple servers.  For example, after patching your environment running a quick query to make sure the …

Read More “T-SQL Tuesday #94 – Automation Through PowerShell Checking the Status of AGs”

Enable SSL Encryption and Import Certificate for Multiple Instances of SQL Server using PowerShell

A recent project involved setting up encrypted connections on all our SQL Servers. To this we would have to install a certificate in on the server and restart the SQL Server service. Direction on how to do this on an individual instance are provided by Microsoft.  We have test environments that we are going to …

Read More “Enable SSL Encryption and Import Certificate for Multiple Instances of SQL Server using PowerShell”

How to Install SQL Server PowerShell 2017 Remotely to Your Servers

As part of upgrading our SQL Servers to 2017 CTP 2.1 we have a process that runs afterwards that uses Invoke-Sqlcmd cmdlet but with SQL Server 2017, SQL Server PowerShell 2017 is a separate install from the PowerShell Gallery.  So I wrote a process to that will install the SQL Server PowerShell remotely to the …

Read More “How to Install SQL Server PowerShell 2017 Remotely to Your Servers”