PowerShell: Recursion And Finding Loops In A Hierarchy With Active Directory Example

Recently, a friend of mine asked me about the best way to find loops in a hierarchy, specifically with Active Directory groups that may be nested (either by design or by mistake) thereby causing loops and this recursion based solution was my recommended answer for him. The Problem: Here is the example he gave me: … Continue reading PowerShell: Recursion And Finding Loops In A Hierarchy With Active Directory Example

SQL Server: Timeout When Viewing SQL Server Agent Job History

Too many times when I try to look at the history of a SQL Server Agent Job, I get this error: TITLE: .Net SqlClient Data Provider ------------------------------ Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=13.00.2210&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: The wait … Continue reading SQL Server: Timeout When Viewing SQL Server Agent Job History

SQL Server: Fix – Msg 1204, Level 19, State 4 – The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time…

This is an error that does not happen often. In fact, I came across this for the first time when one of my co-workers Inken HOEIJMANS asked me about this. With her permission, I am reproducing her code solution here. Thank you Inken! She was trying to run a MERGE statement using a large source … Continue reading SQL Server: Fix – Msg 1204, Level 19, State 4 – The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time…

PowerShell & WPF: Marry Them For Reusable Scripts & Beautiful GUI!

This post is just to give you an idea of what is possible with PowerShell and WPF. It is not a complete solution that is ready to use. I do give you the key functions necessary to make it all work for your scenario and choices you want to make. As an Admin and an … Continue reading PowerShell & WPF: Marry Them For Reusable Scripts & Beautiful GUI!

Python: Solving A Simple Puzzle During Lock-down

It is no surprise that the whole world is under lock-down for Covid-19. A puzzle came my way and I was ready for it. The Puzzle: Here is how the puzzle goes: A master asked his employee to count the number of harvested coconuts while he ran an errand. When the master returned, he asked … Continue reading Python: Solving A Simple Puzzle During Lock-down