Microsoft Exchange Server 2016 PowerShell Cookbook - Fourth Edition
by Jonas Andersson, Nuno Mota, Mike Pfeiffer
There's more...
Together with the code debugger function, we can use the Debug-Job cmdlet that was introduced in version 5 of PowerShell.
The Debug-Job cmdlet lets you break into the script debugger while running a job in a similar way as the Break All function lets us break into running script from the console or ISE.
A typical scenario where we could use Debug-Job is when we are running a long, complex script as a job and, for one reason or another, we suspect the script is not executing correctly. It may be taking longer than expected or some of the output data doesn't seem right. Now we can drop the job into the debugger by using the Debug-Job which allows us to verify that the code is being executed the way it's expected to do. It's ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access