Recently, PASS announced their first round of speakers for Summit 2017 speakers and I’m on the list! I’m particularly excited because Summit is the largest SQL Server event in the world and it’s looking like PowerShell will be getting some…
Recently, I was approached by supa-famous Joey Aiello of the PowerShell team at my favorite conference ever, PSConf.eu. So Joey comes up and says “Chrissy, Aaron Nelson has pretty much required me to talk to you. The SQL Community has…
If you’ve used Out-File, Set-Content or Add-Content to create a SQL file, you may notice that SQL Server Management Studio complains about normalizing the line breaks. If you see this, simply using -Encoding UTF8 for your output instead of ASCII,…
Today’s blog post is part of T-SQL Tuesday. T-SQL Tuesday is the brainchild of Adam Machanic. It is a monthly blog party on the second Tuesday of each month. Everyone is welcome to participate. This month’s T-SQL Tuesday, hosted by…
In a recent version of PowerShell, Publish-Module, which publishes modules to the Gallery began requiring fully qualified Assembly names such as “Microsoft.SqlServer.Smo, Version=$smoversion, Culture=neutral, PublicKeyToken=89845dcd8080cc91”. Previously, it was sufficient just to use short names such as Microsoft.SqlServer.Smo. This had similar…
We’re currently working on standardizing our documentation for dbatools and I needed a list of all of the parameters we use. Here’s how I did it (well, I did it an uglier way then Aaron made it prettier ;)) Get-Command…
Today’s blog post is part of T-SQL Tuesday. T-SQL Tuesday is the brainchild of Adam Machanic. It is a monthly blog party on the second Tuesday of each month. Everyone is welcome to participate. intro dbatools has been around since…
One of my favorite things in PowerShell (and other languages) is the switch statement. It’s clean and a much better alternative to a ton of if elses. Ever had this happen?
if ($state -eq -1)
$diskstate = "Unknown"
elseif ($state -eq 0)
$diskstate = "Inherited"
elseif ($state -eq 1)
$diskstate = "Initializing"
elseif ($state -eq 2)
$diskstate = "Online"
The better way to do it is by…