Windows PowerShell Scripting and Toolmaking

6544

Windows PowerShell Scripting and Toolmaking

In this course, you will learn to build reusable tools by using Windows PowerShell 3.0. This course focuses on the Windows PowerShell scripting language and on the concepts and techniques needed to design tools, including and output requirements and functional requirements. You will learn functions to deal with anticipated errors using standard PowerShell patterns and practices. By course completion, you will be armed with the knowledge and skills to better administer a wide variety of server and client products and technologies that offer Windows PowerShell integration, including Microsoft Exchange Server, Microsoft Windows Active Directory Domain Services, Microsoft SharePoint Server, and more.

  • Write tools, including scripting, parameterizing commands, and providing verbose output
  • Debug tools and provide error handling within tools
  • Combine tools into script and manifest modules
  • Create custom formatting views
  • Create tools that are consistent in naming and operation with native Windows PowerShell tools

Administrators that have little or no programming experience but who have a working knowledge of Windows PowerShell and who are able to use Windows PowerShell to run complex, interactive commands. Students of this course may administer a wide variety of server and client products and technologies that offer Windows PowerShell integration, including Microsoft Exchange Server, Microsoft Windows Active Directory Domain Services, Microsoft SharePoint Server, and more.

  • Attendance in the Automating Administration with Windows PowerShell v3.0 (M10961) is strongly recommended as a pre-requisite to this course
  • Experience in administering Windows server and client computers
  • Experience in running interactive Windows PowerShell commands from the command prompt

Lab 1: Parameterizing a Command

  • Identify changeable values
  • Declare parameters
  • Use parameters in place of changeable values
  • Test the script

Lab 2: Creating a Script Module

  • Creating a Script Module
  • Saving the script module
  • Adding a module-level variable
  • Controlling module member visibility
  • Testing the script module

Lab 3: Handling Errors

  • Using the Try.Catch Construct
  • Handling Command Errors
  • Handling Non-Command Errors
  • Logging Errors to a File
  • Displaying Warning Messages

Lab 4: Writing Commands that Use Pipeline Input and Output

  • Adding Pipeline Input Capability to Parameters
  • Working with Pipeline Input
  • Creating Custom Output Objects
  • Outputting Objects to the Pipeline

Lab 5: Creating Hierarchical Command Output

  • Retrieving and Enumerating Data
  • Creating Child Objects
  • Creating the Parent Object
  • Displaying and Object Hierarchy
  • Persisting an Object Hierarchy

Lab 6: Debugging Scripts

  • Using Write-Debug
  • Using PSBreakpoints

Lab 7 : Customizing Default Formatting

  • Adding a Custom Type Name to an Object
  • Creating a DefaultDisplayPropertySet Type Extension
  • Creating a Custom View
  • Adding Type Extensions and Views to Modules and Creating a Module Manifest

Lab 8: Adding Advanced Parameter Attributes and Command Documentation

  • Defining Aliases and Help Messages
  • Defining Parameter Validation
  • Adding Comment-Based Help
  • Writing a Command that Uses -Confirm and -WhatIf

Lab 9: Creating Controller Scripts

  • Creating a Controller Script
  • Parameterizing a Controller Script
  • Testing a Controller Script
  • Debugging a Controller Script

Lab 10: Creating Reports by using HTML

  • Creating Reports by using HTML
  • Converting Objects into HTML Fragments
  • Combining HTML Fragments
  • Adding Basic Formatting
  • Creating Enhanced HTML Fragments
  • Applying Conditional Formatting

Lab 11: Creating Basic Workflows

  • Importing the PSWorkflow Module
  • Converting a Function to a Basic Workflow
  • Parallelizing Commands

Lab 12: Working with XML Data

  • Loading XML
  • Manipulating XML as an Object Hierarchy
  • Selecting XML Elements by using XPath
  • Modifying XML
  • Saving XML

Lab 13 : Creating Proxy Functions

  • Generating a Proxy Function Template
  • Modifying the Template
  • Using the Proxy Function
  • Bypassing a Proxy Function

Lab 14: Building Tools in Windows PowerShell

  • Designing the Tool
  • Implementing the Tool
  • Testing the Tool

Upcoming Classes

Dates Location GTR  
Jun 5-9 (8:30am-4:30pm) EDT
Jun 26-30 (8:30am-4:30pm) EDT Guaranteed to Run
Jul 10-14 (8:30am-4:30pm) EDT
Jul 17-21 (8:30am-4:30pm) EDT
Jul 24-28 (8:30am-4:30pm) EDT
Jul 31-Aug 4 (11:30am-7:30pm) EDT
Aug 7-11 (8:30am-4:30pm) EDT
Aug 21-25 (8:30am-4:30pm) EDT
Aug 28-Sep 1 (11:30am-7:30pm) EDT
Sep 11-15 (8:30am-4:30pm) EDT
Sep 18-22 (8:30am-4:30pm) EDT
Sep 25-29 (11:30am-7:30pm) EDT
Oct 2-6 (8:30am-4:30pm) EDT
Oct 9-13 (11:30am-7:30pm) EDT
Oct 16-20 (8:30am-4:30pm) EDT

Questions?

Whether you need assistance scheduling a class for yourself or for your group, GCA's Education Account Manager's will craft a customized training solution to meet the needs of your organization.