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:
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 MoreIf you're curious about the
$Env:PSModulePath
for GitHub Runners, here's what I came up with after running a workflow.Knowing the
$Env:PSModulePath
of each runner can be useful for making specific types of GitHub Actions. I used it within my own GitHub Action, psmodulecache which makes caching PowerShell modules from …
Read MoreAfter reading a number of Windows Terminal posts by Thomas Maurer and seeing Windows Terminal Preview available in my Windows App Store, I finally decided to dive in again.
I was sooo excited when Microsoft first made the announcement but was disappointed when I found out I'd have to run a specific version of Windows …
Read MoreJust ran into this issue and solved it by using
powershell -ExecutionPolicy bypass C:\path\to\script.ps1
. Seems there was an issue with the signed module so I just set it to not check the sign.
Read MoreRecently, I ran into an issue after applying a few security updates and subsequent reboots: a number of the SQL services did not start successfully. After running the following script, I've had success with SQL services starting as expected after reboot. It's basically a built-in service start retry. You can read more …
Read More