SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

SQL DBA With A Beard

Rob is a SQL Server DBA currently supporting several hundred databases ranging from SQL 2000 to SQL 2012. Rob has a fabulous beard and loves to use Powershell to make his life easier.

Easily Splatting PowerShell with VS Code

So I always like to show splatting PowerShell commands when I am presenting sessions or workshops and realised that I had not really blogged about it. (This blog is for @dbafromthecold who asked me to )

What is Splatting?

Well you will know that when you call a PowerShell function… Read more

2 comments, 159 reads

Posted in SQL DBA With A Beard on 11 March 2018

dbachecks – Configuration Deep Dive

Today is the day that we have announced dbachecks  a PowerShell module enabling you to validate your SQL Instances. You can read more about it here where you can learn how to install it and see some simple use cases

108 Configurations

One of the things I have been talking… Read more

6 comments, 217 reads

Posted in SQL DBA With A Beard on 22 February 2018

Announcing dbachecks – Configurable PowerShell Validation For Your SQL Instances

For the last couple of months members of the dbatools team have been working on a new PowerShell module called dbachecks. This open source PowerShell module will enable you to validate your SQL Instances. Today it is released for you all to start to use

Validate Your SQL Instances?

Read more

10 comments, 2,095 reads

Posted in SQL DBA With A Beard on 22 February 2018

VS Code – Terminal crashes when formatting script

I love VS Code. I love being able to press ALT + SHIFT + F and format my code.

The Problem

Yesterday all I got when I pressed ALT + SHIFT + F was this

I could reproduce it will. This was very frustrating.

Turning on Verbose Logging

To turn… Read more

0 comments, 251 reads

Posted in SQL DBA With A Beard on 10 February 2018

How I created PowerShell.cool using Flow, Azure SQL DB, Cognitive Services & PowerBi

Last weekend I was thinking about how to save the tweets for PowerShell Conference Europe. This annual event occurs in Hanover and this year it is on April 17-20, 2018. The agenda has just been released and you can find it on the website http://www.psconf.eu/

I ended up creating an… Read more

1 comments, 376 reads

Posted in SQL DBA With A Beard on 3 February 2018

How to write a PowerShell function to use Confirm, Verbose and WhatIf

In my last blog post I showed how to run a script with the WhatIf parameter. This assumes that the commands within the script have been written to use the common parameters Confirm, Verbose and WhatIf.

Someone asked me how to make sure that any functions that they write will… Read more

1 comments, 1,010 reads

Posted in SQL DBA With A Beard on 25 January 2018

How to run a PowerShell script file with Verbose, Confirm or WhatIf

Before you run a PowerShell command that makes a change to something you should check that it is going to do what you expect. You can do this by using the WhatIf parameter for commands that support it. For example, if you wanted to create a New SQL Agent Job… Read more

2 comments, 174 reads

Posted in SQL DBA With A Beard on 23 January 2018

Pester 4.2.0 has a Because…… because :-)

I was going through my demo for the South Coast User Group meeting tonight and decided to add some details about the Because parameter available in the Pester pre-release version 4.2.0.

To install a pre-release version you need to get the latest  PowerShellGet module. This is pre-installed with PowerShell v6… Read more

1 comments, 168 reads

Posted in SQL DBA With A Beard on 18 January 2018

Using the AST in Pester for dbachecks

TagLine – My goal – Chrissy will appreciate Unit Tests one day

Chrissy has written about dbachecks the new up and coming community driven open source PowerShell module for SQL DBAs to validate their SQL Server estate. we have taken some of the ideas that we have presented about a… Read more

0 comments, 160 reads

Posted in SQL DBA With A Beard on 15 January 2018

Converting a Datarow to a JSON object with PowerShell

This is just a quick post. As is frequent with these they are as much for me to refer to in the future and also because the very act of writing it down will aid me in remembering. I encourage you to do the same. Share what you learn because… Read more

3 comments, 1,235 reads

Posted in SQL DBA With A Beard on 18 December 2017

Handling Missing Instances when Looping with Pester

In my previous posts about writing your first Pester Test and looping through instances I described how you can start to validate that your SQL Server is how YOU want it to be.

Unavailable machines

Once you begin to have a number of tests for a number of instances you… Read more

0 comments, 193 reads

Posted in SQL DBA With A Beard on 30 November 2017

2 Ways to Loop through collections in Pester

In my last post I showed you how to write your first Pester test to validate something. Here’s a recap

  • Decide the information you wish to test
  • Understand how to get it with PowerShell
  • Understand what makes it pass and what makes it fail
  • Write a Pester Test

You probably… Read more

1 comments, 193 reads

Posted in SQL DBA With A Beard on 28 November 2017

Write Your first Pester Test Today

I was in Glasgow this Friday enjoying the fantastic hospitality of the Glasgow SQL User Group @SQLGlasgow and presenting sessions with Andre Kamman, William Durkin and Chrissy LeMaire

I presented “Green is Good Red is Bad – Turning your checklists into Pester Tests”. I had to make sure I… Read more

2 comments, 234 reads

Posted in SQL DBA With A Beard on 16 November 2017

TSQL2sDay – Folks Who Have Made a Difference

This months TSQL2sDay is an absolute brilliant one hosted by Ewald Cress

the opportunity to give a shout-out to people (well-known or otherwise) who have made a meaningful contribution to your life in the world of data.

Fabulous, fabulous idea Ewald, I heartily approve

Now this is going to be… Read more

1 comments, 149 reads

Posted in SQL DBA With A Beard on 14 November 2017

Comparing Agent Jobs across Availability Group Replicas with PowerShell

On the plane home from PAS Summit I was sat next to someone who had also attended and when he saw on my laptop that I was part of the SQL Community we struck up a conversation. He asked me how he could compare SQL Agent Jobs across availability group… Read more

1 comments, 1,091 reads

Posted in SQL DBA With A Beard on 10 November 2017

Using Plaster To Create a New PowerShell Module

Chrissy, CK and I presented a pre-con at PASS Summit in Seattle last week

Tracey Boggiano T | B came along to our pre-con and afterwards we were talking about creating PowerShell modules. In her blog post she explains how she creates modules by copying the code from another module… Read more

2 comments, 1,063 reads

Posted in SQL DBA With A Beard on 9 November 2017

dbatools with SQL on Docker and running SQL queries

I had a question from my good friend Andrew Pruski dbafromthecold on twitter or SQL Container Man as I call him

How do you guys run SQL Commands in dbatools

I will answer that at the bottom of this post, but during our discussion Andrew said he wanted to show… Read more

3 comments, 263 reads

Posted in SQL DBA With A Beard on 7 November 2017

A Pretty PowerBi Pester Results Template File

I have left the heat and humidity of Singapore where I have been presenting at the PowerShell Conference Asia and DevOpsDays Singapore to travel to Seattle for PASS Summit. During my Green is Good – Red is Bad session someone asked me if the PowerBi that I showed at the… Read more

1 comments, 255 reads

Posted in SQL DBA With A Beard on 29 October 2017

TSQL2sDay – Get-PostRoundup

First an apology, this round up is late!

The reason for that is an error in the PowerShell testing module Pester (That’s not completely true as you shall see!!)

I spoke in Stuttgart at the PowerShell Saturday last weekend and had intended to write this blog post whilst travelling, unfortunately… Read more

2 comments, 936 reads

Posted in SQL DBA With A Beard on 20 September 2017

#TSQL2sDay – Starting Out with PowerShell

This months TSQL2sday is hosted by me!

Surprise! – I chose PowerShell

I am really looking forward to seeing what other people post. Some advanced scripts that will help you and show you how you can use PowerShell to save you time and hopefully some beginner posts explaining experiences or… Read more

3 comments, 317 reads

Posted in SQL DBA With A Beard on 12 September 2017

Older posts