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 to
Out-GridView. I did start down this route, but the
Get-DbaRegServerfunction 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.