This post is about a huge update to the CSV import (and now export!) capabilities in dbatools. If you’ve used Import-DbaCsv, you’ve been using the LumenWorks CSV library under the hood for years. It’s been rock solid and I’ve sung its praises many times. But LumenWorks was last updated 7-8 years ago, and .NET has come a long way since then.
I’ve been using Claude Code for various projects and had a Max 20x account when Anthropic announced they’d be pretty much giving away Opus 4.
TLDR: dbatools is moving to Azure Trusted Signing, which means Microsoft backs our reputation and dbatools won’t trigger as many antivirus false positives.
Users upgrading from older signed versions will need -SkipPublisherCheck only once during the initial transition. PowerShell users with strict ExecutionPolicies (AllSigned/RemoteSigned) will need to trust each new certificate after every update due to Azure Trusted Signing’s daily cert rotation (but you can use the automation script provided below).
TLDR: This error is expected and the change is legitimate. To update, switch to Install-Module, then slap on the -SkipPublisherCheck and -Force parameters and continue your update.
Install-Module dbatools -Force -SkipPublisherCheck I’ve always been very proud that dbatools is Code Signed like a “real” application. These certs prove the identity of the creator and help prevent tampering. The certificates cost a bunch of money and are hard to obtain. You gotta send in tons of paperwork, including your passport and business papers.
If 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, with the introduction of the new dbatools.library dependency, the installation process has become a smidge more complex. In this post, I’ll walk you through the steps to install dbatools (and with it, dbatools.
So 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:
Install-Module dbatools Requirements dbatools still works on PowerShell v3 an v4! Thanks to Microsoft for making that possible with SMO.
PowerShell v5.1 is still supported, of course. That’s what I use and develop on. But when it comes to PowerShell v7, we did up the requirements to 7.
This 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:
Ease-of-use Reliability Data quality management I learned a ton about performance from my speed experiments but in the end, I threw most of that out in favor of a higher quality and mildly slower solution using a .
SQL Client Aliases allow you to connect to a SQL Server instance using another name. This is especially useful during migrations. Want your servers to connect to the new SQL Server without modifying connection strings within your application? Or what if you could use easy-to-remember names for your docker containers? SQL Client Aliases can help.
For the longest time, I managed these aliases using cliconfg for 64-bit applications (C:\Windows\System32\cliconfg.exe) or cliconfg for 32-bit applications (C:\Windows\SysWOW64\cliconfg.
Within dbatools, you may notice file sizes are pretty and human-readable.
That was some C# based magic created by Microsoft PFE and creator of PSFramework, Fred Weinmann. In the background, SQL Server often gives us different types of numbers to represent file sizes. Sometimes it’s bytes, sometimes it’s megabytes. We wanted to standardize the sizing in dbatools, and thus the dbasize type was born.
Usage This size type is cool because it looks beautiful, showing KB, MB, GB, TB and PB.
After nearly 10 months of work, early access to Learn dbatools in a Month of Lunches is now available from our favorite publisher, Manning Publications!
For years, people have asked if any dbatools books are available and the answer now can finally be yes, mostly 😊. Learn dbatools in a Month of Lunches, written by me and Rob Sewell (the DBA with the beard), is now available for purchase, even as we’re still writing it.
Some dbatools functionality that has not been talked about much on the blog are our internal configuration options. This functionality was added back in October 2017. Kind of like how in ADS or SSMS, you can go to File -> Preferences -> Settings or Edit -> Preferences to edit advanced preferences and options, you can do something similar in dbatools!
Since dbatools is command-line based, you can view/modify your current options using our various config commands.