Module 1: Tool Design
This module explains how to design tools and units of automation that comply with native PowerShell usage patterns.Lessons
- โข Tools do one thing
- โข Tools are flexible
- โข Tools look native
Lab : Designing a Tool
After completing this module, students will be able to:
- โข Describe the native shell patterns that a good tool design should exhibit
Module 2: Start with a Command
This module explains how to start the scripting process by beginning in the interactive shell console.Lessons
- โข Why start with a command?
- โข Discovery and experimentation
Lab : Designing a Tool
After completing this module, students will be able to:
- โข Describe the benefits of discovery and experimentation in the console
- โข Discover and experiment with existing commands in the console
Module 3: Build a Basic Function and Module
This module explains how to build a basic function and module, using commands already experimented with in the shell.Lessons
- โข Start with a basic function
- โข Create a script module
- โข Check prerequisites
- โข Run the new command
Lab : Designing a Tool
- โข Build a basic function and module
After completing this module, students will be able to:
- โข Build a basic function
- โข Create a script module
- โข Run a command from a script module
Module 4: Adding CmdletBinding and Parameterizing
This module explains how to extend the functionality of a tool, parameterize input values, and use CmdletBinding.Lessons
- โข About CmdletBinding and common parameters
- โข Accepting pipeline input
- โข Mandatory-ness
- โข Parameter validation
- โข Parmeter aliases
Lab : Designing a Tool
- โข Adding CmdletBinding and Parameterizing
After completing this module, students will be able to:
- โข Describe the purpose of CmdletBinding and list common parameters
- โข Parameterize a scriptโs input
- โข Define parameters as mandatory
- โข Define parameters as accepting pipeline input
- โข Define parameter validation
Module 5: Emitting Objects as Output
This module explains how to create tools that produce custom objects as output.Lessons
- โข Assembling information
- โข Constructing and emitting output
- โข Quick tests
Lab : Designing a Tool
- โข Emitting objects as output
After completing this module, students will be able to:
- โข Describe the purpose of object-based output
- โข Create and output custom objects from a function
Module 6: An Interlude: Changing Your Approach
This module explains how to re-think tool design, using concrete examples of how itโs often done wrong.Lessons
- โข Examining a script
- โข Critiquing a script
- โข Revising the script
After completing this module, students will be able to:
- โข Describe the native patterns that a good tool design should exhibit
- โข Redesign a script to meet business requirements and conform to native patterns
Module 7: Using Verbose, Warning, and Informational Output
This module explains how to use additional output pipelines for better script behaviors.Lessons
- โข Knowing the six channels
- โข Adding verbose and warning output
- โข Doing more with verbose output
- โข Informational output
Lab : Designing a Tool
- โข Using Verbose, Warning, and Informational Output
After completing this module, students will be able to:
- โข Describe the six output channels in the shell
- โข Write commands that use verbose, warning, and informational output
- โข Run commands with extra output enabled
Module 8: Comment-Based Help
This module explains how to add comment-based help to tools.Lessons
- โข Where to put your help
- โข Getting started
- โข Going further with comment-based help
- โข Broken help
Lab : Designing a Tool
After completing this module, students will be able to:
- โข Describe the purpose and construction of comment-based help
- โข Add comment-based help to a function
- โข Identify causes of broken comment-based help
Module 9: Handling Errors
This module explains how to create tools that deal with anticipated errors.Lessons
- โข Understanding errors and exceptions
- โข Bad handling
- โข Two reasons for exception handling
- โข Handling exceptions in our tool
- โข Capturing the actual exception
- โข Handling exceptions for non-commands
- โข Going further with exception handling
- โข Deprecated exception handling
Lab : Designing a Tool
After completing this module, students will be able to:
- โข Describe the native patterns for handling errors in a command
- โข Add error handling to a command
- โข Run a command and observe error handling behaviors
Module 10: Basic Debugging
This module explains how to use native PowerShell script debugging tools.Lessons
- โข Two kinds of bugs
- โข The ultimate goal of debugging
- โข Developing assumptions
- โข Write-Debug
- โข Set-PSBreakpoint
- โข The PowerShell ISE
Lab : Designing a Tool
After completing this module, students will be able to:
- โข Describe the tools used for debugging in PowerShell
- โข Debug a broken script
Module 11: Going Deeper with Parameters
This module explains how to further define parameter attributes in a PowerShell command.Lessons
- โข Parameter positions
- โข Validation
- โข Multiple parameter sets
- โข Value from remaining arguments
- โข Help messages
- โข Aliases
- โข More CmdletBinding
After completing this module, students will be able to:
- โข Describe the use of positional parameters
- โข Describe additional parameter validation methods
- โข Describe how to define multiple parameter sets
- โข Describe other parameter definition options
Module 12: Writing Full Help
This module explains how to create external help for a command.Lessons
- โข External help
- โข Using PlatyPs
- โข Supporting online help
- โข โAboutโ topics
- โข Making your help updatable
Lab : Designing a Tool
After completing this module, students will be able to:
- โข Describe the advantages of external help
- โข Create external help using PlatyPS and Markdown
Module 13: Unit Testing Your Code
This module explains how to use Pester to perform basic unit testing.Lessons
- โข Sketching out the test
- โข Making something to test
- โข Expanding the test
- โข Going further with Pester
Lab : Designing a Tool
- โข Unit testing your code
After completing this module, students will be able to:
- โข Describe the purpose of unit testing
- โข Write basic unit tests for PowerShell functions
Module 14: Extending Output
Types
This module explains how to extend objects with additional capabilities.Lessons
- โข Understanding types
- โข The Extensible Type System
- โข Extending an object
- โข Using Update-TypeData
After completing this module, students will be able to:
- โข Describe the purpose of the ETS
- โข Extend an existing object type
Module 15: Analyzing Your Script
This module explains how to use Script Analyzer to support best practices and prevent common problems.Lessons
- โข Performing a basic analysis
- โข Analyzing the analysis
Lab : Designing a Tool
- โข Analyzing your script
After completing this module, students will be able to:
- โข Describe the use of Script Analyzer
- โข Perform a basic script analysis
Module 16: Publishing Your Tools
This module explains how to publish tools to public and private repositories.Lessons
- โข Begin with a manifest
- โข Publishing to PowerShell Gallery
- โข Publishing to private repositories
Lab : Designing a Tool
- โข Publishing your tools
After completing this module, students will be able to:
- โข Describe the tool publishing process and requirements
- โข Publish a tool to a repository
Module 17: Basic Controllers: Automation Scripts and Menus
This module explains how to create controller scripts that put tools to use.Lessons
- โข Building a menu
- โข Using UIChoice
- โข Writing a process controller
Lab : Designing a Tool
After completing this module, students will be able to:
- โข Describe the purpose of basic controller scripts
- โข Write a simple controller script
Module 18: Proxy Functions
This module explains how to create and use proxy functions.Lessons
- โข A proxy example
- โข Creating the proxy base
- โข Modifying the proxy
- โข Adding or removing parameters
Lab : Designing a Tool
After completing this module, students will be able to:
- โข Describe the purpose of proxy functions
- โข Create a simple proxy function
Module 19: Working with XML Data
This module explains how to work with XML data in PowerShell.Lessons
- โข Simple: CliXML
- โข Importing native XML
- โข ConvertTo-XML
- โข Creating native XML from scratch
Lab : Designing a Tool
After completing this module, students will be able to:
- โข Describe the use of XML within PowerShell
- โข Use XML data within a PowerShell function
Module 20: Working with JSON Data
This module explains how to using JSON data in PowerShell.Lessons
- โข Converting to JSON
- โข Converting from JSON
Lab : Designing a Tool
- โข Working with JSON data
After completing this module, students will be able to:
- โข Describe the use of JSON data within PowerShell
- โข Use JSON data within a PowerShell function
Module 21: Working with SQL Server Data
This module explains how to use SQL Server from within a PowerShell script.Lessons
- โข SQL Server terminology and facts
- โข Connecting to the server and database
- โข Writing a query
- โข Running a query
- โข Invoke-SqlCmd
- โข Thinking about tool design patterns
After completing this module, students will be able to:
- โข Describe the use of SQL Server from within PowerShell
- โข Write and run SQL Server queries
- โข Design tools that use SQL Server for data storage
Module 22: Final Exam
This module provides a chance for students to use everything they have learned in this course within a practical example.Lessons
- โข Lab problem
- โข Break down the problem
- โข Do the design
- โข Test the commands
- โข Code the tool
Lab : Final Exam
Lab : Final Exam
After completing this module, students will be able to:
- โข Create PowerShell tools, using native design patterns, from business requirements.