powershell

Every year, I spend the Sunday after SQL Saturday Rochester scanning & processing raffle tickets for our wonderful sponsors. Here’s how the system works: Attendees get tickets (one ticket per sponsor) with their name, the sponsors name, and a QR code on them The QR codes represents a URI, unique to the combination of event,…

Read More Processing SQL Saturday Raffle Tickets with PowerShell

This month’s T-SQL Tuesday is hosted by Rob Sewell and he’s posed the following question: What are you going to automate today with PowerShell? I’m cheating a little bit in that this is something I did a couple weeks ago, but it was immensely helpful. I’d been working on building out a new instance to…

Read More T-SQL Tuesday #94 – Automating Configuration Comparison

Earlier this week I was working on adding a new feature to Update-DbaTools and while looking at another cmdlet to check syntax/conventions, I noticed an ugly typo in some of the help for it. 100% perfect prose isn’t necessary in the comment-based help for PowerShell cmdlets, but seeing misspellings and such kind of bugs me.…

Read More Spell-checking dbatools with Visual Studio Code

Recently I was working on a bit of PowerShell to download the awesome First Responder Kit from Brent Ozar Unlimited. The canonical URL for the FRK is http://firstresponderkit.org/ but that’s a redirect to the GitHub repository where all the magic happens. I thought to myself: Self! Rather than take a chance on that GitHub URL…

Read More An Unexpected Side-Effect of Invoke-WebRequest

In a previous post, I expressed some frustration over Invoke-SqlCmd not setting an Application Name for its ODBC connection, leaving us with the generic .NET SqlClient Library when looking at active sessions in sp_who2 and sp_whoisactive (and any other monitoring tool). Unfortunately, I can’t really do anything about Invoke-SqlCmd aside from posting a suggestion on Connect or the…

Read More Adding Application Name to Invoke-SqlCmd2