Category: SQL Server

SSMS Complains of “Inconsistent Line Endings” with PowerShell Output

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,

Posted in PowerShell, SQL Server

T-SQL Tuesday: The Cloud, Globalization and Automation

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

Posted in PowerShell, SQL Server

Loading SMO in Your SQL Server-centric PowerShell Modules

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

Posted in PowerShell, SQL Server

dbatools to the backup/restore rescue

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

Posted in PowerShell, SQL Server

Immediately Output Runspace Results to the Pipeline

In my previous post, I presented the template I use anytime I need to add multithreading to my scripts. Recently, I had a request to add multi-threading to Read-DbaBackupHeader. This was the first runspace in which I had to output

Posted in PowerShell, SQL Server

Contributing to dbatools & dbareports using GitHub Desktop

Repost from dbatools.io: Recently, I presented to the Philadelphia PowerShell User Group about Contributing to Open Source PowerShell projects using GitHub Desktop. I chose this topic because a number of people have asked for step-by-step instructions on how to work

Posted in PowerShell, SQL Server

Guest blogger Cláudio Silva: Why Expand-SqlTLogResponsibly?

Hey yall! I invited one of the most active dbatools developers, Cláudio Silva, to do a guest post about his motivation for joining the team and why he built this particular command. So without further ado… here’s Cláudio :D Hi

Posted in PowerShell, SQL Server

New PowerShell Commands from the SQL Server Team!

Have you seen the SQL Server Tools team’s post about the PowerShell module for SQL Server? There are TWENTY FIVE new cmdlets! TWENTY FIVE! That’s a 53% increase over the previous 46 cmdlets. It looks like the SQL Server community

Posted in PowerShell, SQL Server