So I figured I’d take a look and see what was happening and how we could fix it. Now I’m going to be honest with you, my usual method of debugging involves adding
Write-Host 'Hi
‘, or piping objects toOut-GridView
. I did start down this route, but theGet-DbaRegServer
function calls an internal function, and things quickly got complicated.Luckily, the PowerShell extension for VSCode includes a debugger so we can level up our game and use that to track down our issues.
Click through to see how it works.