3. Agenda Crazy amounts of demo, very little slide Shell transcript and samples will be downloadable from ConcentratedTech.com by next week Error Handling Debugging Techniques “Script Cmdlets” (Advanced Functions) Tips along the way
4. Errors in PowerShell Non-terminating errors take the behavior in $ErrorActionPreference Must make terminating to trap/handle Use the –ErrorAction (-EA) parameter Use –ErrorVariable (-EV) to capture the error in a variable Use Try…Catch to actually catch the error
5. Debugging Write-Debug to write trace code Write-Verbose to write “progress” info $DebugPreference, $VerbosePreference -debug and –verbose for scripts Also: PSBreakpoints
6. Advanced Functions A function that looks and works and smells like a “real” cmdlet Mainly just decorating function parameters and adding comment-based help Couple of cool tricks to support –confirm and –whatif Accept both pipeline and parameter input Let’s make one
7. Pretty cool stuff, eh? Again – shell transcript/samples will be on ConcentratedTech.com by next week
8. Final Q&A Text DONJ to 50500 for contact info See me for add’l resources Books Workshop recordings Demo videos Etc Slide decks posted to ConcentratedTech.com by next week
9. Your Feedback is Important Please fill out a session evaluation form drop it off at the conference registration desk. Thank you!