If you're wondering about the uptick in SQL Server-related posts, I recently changed jobs and went back to being a SQL Server DBA. For a few years there, I switched to security engineering; I figured I'd try something new and welcomed no longer being an admin. It was nice enough and I got to do a ton of PowerShell, but …
Read MoreI recently got into VS Code Dev Containers and Azure Functions, and I love them. Unfortunately, the PowerShell Azure Functions pretty much come out of the box with a high likelihood of throwing OmniSharp exceptions when debugging. Two of the files the setup process generates, launch.json and tasks.json, use the func …
Read MoreIf you work in an offline environment, you're probably familiar with how painful it can be to install anything, including PowerShell modules like dbatools. In the past, dbatools had no dependencies, so the installation process was somewhat straightforward — you could even download a zip from our GitHub repo. However, …
Read MoreNote: This blog post is going to borrow a bit from Microsoft's official documentation in "Connect with Azure Data Studio" and from our book, Learn dbatools in a Month of Lunches. It also addresses dbatools 2.0. Update, 2025: dbatools 2.0 has since shipped and the guidance below still applies. Newer SSMS …
Read MoreSo much is new and different! If you'd like to try it while you read this blog post, you can currently install dbatools 2.0 by executing the following command: 1Install-Module dbatools Requirements dbatools still works on PowerShell v3 an v4! Thanks to Microsoft for making that possible with SMO. PowerShell v5.1 is …
Read MoreI cannot believe my eyes. I imagine some PowerShellers will disagree with me but when developing modules that support older versions of PowerShell, I refuse to even try to support Core vs Desktop in my module manifest. I imagine this will be the case for the next decade or two. I've been working on dbatools 2.0 for a …
Read MoreI've been trying for years to get dbatools to import faster. There's a lot of plain-text code to import and even more help. Binary modules like Microsoft's SqlServer module benefit from prior compilation and can be imported in like 500-900ms whereas dbatools generally takes 2-5 seconds. I've written about module …
Read MoreCode signing your scripts, modules and applications can help increase enterprise adoption, as large organizations often prohibit running unsigned tools on Windows. Signed code allows machines to verify that what they're running hasn't been altered or compromised by a third party, which ultimately increases their …
Read MoreYears ago before I learned PowerShell, I was using T-SQL to do things it just wasn't meant to do, namely SQL Server estate management. T-SQL is incredibly efficient when managing data, but it's not very efficient when managing SQL Server instances. For example, say you need to perform a task against each database. The …
Read MoreThis post is about Import-DbaCsv, a command within the dbatools PowerShell module for SQL Server. I've been writing about CSV imports using PowerShell for a pretty long time and in VBScript for even longer. Initially, my primary concerns were ease-of-use and speed. Over time, I realized that what mattered most was: …
Read More