Pester – dbatools https://dbatools.io/ the community's sql powershell module Tue, 09 Jan 2018 20:20:27 +0000 en-US hourly 1 https://wordpress.org/?v=5.3.4 https://dbatools.io/wp-content/uploads/2016/05/dbatools.png?fit=32%2C32&ssl=1 Pester – dbatools https://dbatools.io/ 32 32 111052036 t-sql tuesday and new module teaser https://dbatools.io/new-module-coming-soon/ https://dbatools.io/new-module-coming-soon/#comments Tue, 09 Jan 2018 08:36:59 +0000 https://dbatools.io/?p=6904
TSQL2SDAY-150x150
 
Today’s blog post is part of T-SQL Tuesday. T-SQL Tuesday is the brainchild of Adam Machanic. It is a blog party on the second Tuesday of each month. Everyone is welcomed to participate.

This month’s T-SQL Tuesday, hosted by Arun Sirpal ([b]|[t]), is all about overcoming technical challenges.

The challenge

I always try to solve my technical issues with natively available (aka Microsoft) solutions. It’s one of the many reasons I love PowerShell.

When it comes to monitoring, I know there are some really wonderful solutions out there. SentryOne and SolarWinds come to mind but I don’t always need deep query level monitoring or I may not be able to pay licencing costs for all of my SQL Instances. But I do need to easily know if they are all set up correctly.

Ever since I was a baby DBA, I’ve wanted to create a centralized solution that I could roll in with and get going with after finding all of my servers. Over the years, I’ve tried to put together some ASP/VBScript solutions, then when I learned PowerShell, tried PowerShell and SQL Agent, but I just wasn’t feeling it. I could never figure out how to make the checks modular and universal. That is, until I learned about Pester in-depth from Rob Sewell.

The solution

The solution I’ve been looking for turns out to be a mix of dbatools and Pester. Pester is the first Open Source community project formally included in a Windows release! Windows 10 and Windows Server 2016 include Pester by default.

Pester makes it easy to standardize tests or “checks” because it can output its results in a number of standardized formats, including NunitXml and JSON. It’s all PowerShell, after all.

dbatools makes it easy to perform these checks without installing additional software or stored procedures on each of my servers. I have one central workstation that needs to be updated and checking hundreds of servers is as easy as checking just one.

So after poring over Rob’s prodigious GitHub Presentation Repository, I found a bunch of his tests, and added them to a newly created module. I then created an index of the checks to make them easy to access. Once I got the proof of concept down, I invited a few people from the community who I know are involved in Pester and asked them to help.

The result has been a dream come true!

Index

Index of checks. You can run them all, run by group or only run the specific tests that matter to your environment.

 

Power BI Universal Dashboard

Courtesy of Cláudio Silva. Just hit refresh and you’re all set!

 

Included Parser & Mailer

Also from Rob’s repo!

We are still working on the checks, but these screenshots should give you an idea about the new SQL PowerShell module that Rob and I will be premiering at our SQLBits PowerShell Precon, Reliable, Repeatable, & Automated: PowerShell for DBAs, in London on Thursday, February 22 2018.

Interested in finding out more? Find us at SQLBits!

]]>
https://dbatools.io/new-module-coming-soon/feed/ 10 6904