Monitor SOAP request with powershell

For debugging PowerShell I absolutely love transcript logging .

Typically I include an overridable property or look for a Registry key on the host, if true it does logging and sends it to a defined folder ($Env:Temp if I’m being lazy). I’ll also then set $VerbosePreference to ‘continue’ and scatter Write-Verbose about the script to let me know what is going on, what variables are populated and so on. If you’re getting errors you’ll capture them, if you crash out you get a rough idea of what was completed successfully, so on.

I’ve been bitten more times than I care to remember by the ISE caching some variable somewhere that wasn’t present on execution.