Skip to content
Home » Powershell

Powershell

Resolved: Login failed for user NT AUTHORITY\ANONYMOUS LOGON – Delegation Step-by-Step

Sometimes when trying to access a linked server, you’d get an error saying “Login failed for user NT AUTHORITY\ANONYMOUS LOGON”. This happens because you’re connected using Windows authentication, and SQL Server fails to “forward” your credentials to the linked server.

Hopefully, with this blog post, I’ll provide you with an easy-to-understand step-by-step guide, which would help you resolve the issue the right way, without any workarounds.

Read More »Resolved: Login failed for user NT AUTHORITY\ANONYMOUS LOGON – Delegation Step-by-Step

I got the Power: Remote Execution using Powershell and SQL Server

As part of my journey to get better at Powershell, I gave myself a task: Create a project utilizing Powershell at its core, to solve a complicated problem as elegantly as possible.

A complicated problem indeed presented itself: How to remotely control multiple computers without having to log into them? Make them perform any task that could possibly be needed? Control them from one central location? And make the solution as easily scalable as possible?

I present to you, the Framework for Remote Execution using Powershell and SQL Server. Or in short: FREPS. Hmm… Actually, I may have to work on that name. 🤔

Read More »I got the Power: Remote Execution using Powershell and SQL Server

T-SQL Tuesday #143 – Short Powershell code to move DB files in AlwaysOn

This month’s #tsql2sday is hosted by John McCormack who asks us to share some useful snippets of code that can help us in our everyday jobs.

Well, honestly, this is more or less what my blog is mostly about anyway: sharing insights, scripts, and code snippets that I found to be helpful in my day-to-day job as a SQL Server consultant.

Read More »T-SQL Tuesday #143 – Short Powershell code to move DB files in AlwaysOn

One handy Powershell script template to rule them all

If you know me, you already know that I’m a huge fan of automation. Therefore, it’s natural to assume that I would dabble in Powershell at least once or twice or a few dozen, as a method to implement useful automations. After all, automation is pretty much the whole essence of Powershell in the first place.

As I used Powershell scripts more and more, I learned that there are a few things that are important to have whenever you use such scripts as part of automation (by “automation” I mean any sort of operation done “unattended”, i.e. without direct human interaction in real-time).

Read More »One handy Powershell script template to rule them all

Planning a Migration from Azure SQL DB to Azure Managed Instance

Problem

Your organization has been using Azure SQL DB (Single Database) for a while now, and has come to the realization that a lot of missing features are hindering your development efforts and limiting your product offerings.

You have a need for wider access to instance-level features on the one hand, but you still want to retain managed service features in the Azure cloud, such as 99.99% uptime SLA, automatic updates, Advanced Data Security, and Azure SQL Log Analytics, and basically not having to manage an IaaS virtual machine.

Therefore, you reach the conclusion that Azure SQL Managed Instance (MI) is the right solution for you at this time.

Read More »Planning a Migration from Azure SQL DB to Azure Managed Instance

Import GitHub Issues from Trello Cards using Powershell

I know this has little to do with SQL Server (and therefore, not quite like me to post this), but it’s a nifty little script in Powershell which I’ve been working on recently, and I believe other people may find use for it as well (someone, somewhere, maybe?).

This script basically takes a Trello JSON file (created using their Export feature), connects to a GitHub repository, and creates one GitHub issue per each Trello card. Any labels are copied over, any checklists in the Trello card will be added into the issue body as checklists, and any attachments in the Trello card will be added into the issue body as an unordered list of links. Finally, at the bottom of the issue’s body there would be a link back to the original Trello card.

Read More »Import GitHub Issues from Trello Cards using Powershell