Overview

This course focuses on using Advanced PowerShell techniques to automate the administration and management of Windows operating systems. This course provides learners with the knowledge and skills needed to create production-quality PowerShell tools.

About this course

You'll learn how to build advanced Scripts, Functions and custom Modules to create a custom Toolset for other users to use in your environment.

Note: This course covers the use of PowerShell for managing Windows operating systems. It doesn’t cover management of the Linux or macOS operating systems.

Level: Intermediate\Advanced

Audience

This course is intended for IT professionals already experienced in general Windows Server and Windows Client administration. Students should already have a foundational knowledge of Windows PowerShell, which can be obtained by taking course AZ040: Automating Administration with PowerShell.

Read more +

Prerequisites

In addition to their professional experience, learners who attend this training should already have experience with MAZ040: Automating Administration with PowerShell, or equivalent PowerShell experience.

You should be confident with most of the following list:

  • Find commands and learn to use them by using Get-Command and Get-Help
  • Use multiple commands together in the pipeline to produced desired output
  • Manipulate command output in the pipeline to format, export, or convert data
  • Use Remoting to connect to remote computers
  • Query WMI/CIM classes
  • Write very basic scripts files
Read more +

Outline

Course syllabus

The course content includes a mix of content, demonstrations, hands-on labs, and reference links.

Module 1: Preparing for Scripting

Overview

This module will introduce learners to the differences between Windows PowerShell 5.1 and PowerShell 7. How to prepare the scripting environment, Coding constraints when writing scripts, and a recap on Variables and Operators, and Scripting Constructs.

Lessons

  • PowerShell Scripting Overview
  • Preparing the scripting environment
  • PowerShell coding constraints
  • Variables and Operators recap
  • Scripting Constructs recap

After completing this module, learners will be able to:

  • Understand the difference between Windows PowerShell 5.1 and Powershell 7.x
  • Install PowerShell 7 and Visual Studio Code
  • Work with Variables and Operators
  • Understand the different Looping and Conditional constructs that PowerShell uses

Module 2: From Command to Script to Function to Module

Overview

In this module learners will learn how to create and configure advanced functions and script modules. The primary focus will be on parameterizing advanced functions and controlling the output that they generate, but you will also find out how to convert functions into script modules. Script modules are an effective way to share commands with co-workers and colleagues. With script modules, you can make complex commands available to someone with less technical expertise, and you can more easily reuse the commands.

Lessons

  • Moving from Command to Script
  • Understanding Scripts and Functions
  • Moving from Script to Function
  • Moving from Function to Script Module

After completing this module, learners will be able to:

  • Parameterize a command and create an advanced function.
  • Define parameter attributes and input validation for a function.
  • Convert a script and function into a script module.
  • Explain the use of Dot-Sourcing
  • Explain the functionality of Scope.

Module 3: Writing Commands that use Pipeline Input and Output

Overview

In this module learners will learn how to use advanced Parameter settings to accept Pipeline Input, create custom objects to implement pipeline output, create a custom formatting file for the custom object and create a Module manifest file.

Lessons

  • Writing Functions That Accept Pipeline Input
  • Implementing pipeline Output
  • Adding Custom Formatting
  • Creating a Module Manifest File

After completing this module, learners will be able to:

  • Describe the advanced techniques for passing pipeline data.
  • Modify a function to accept pipeline input.
  • Produce complex pipeline output in a function.
  • Create custom formatting files
  • Create a manifest file

Module 4: Adding Command Documentation

Overview

In this module learners will learn how to add help documentation to your scripts and functions by using Comments, Verbose comments and custom comment based help into your Scripts\ Functions

Lessons

  • Overview of Script and function Documentation
  • Document by using Comment-Based Help

After completing this module, learners will be able to:

  • Explain and use script documentation
  • Describe the advantages of comment-based Help.
  • Add comment-based Help to a function.

Module 5: Handling Errors

Overview

In this module, learners will learn about the shell’s default error handling behaviour and learn about different mechanisms for detecting and capturing errors that occur while a script or function is running.

Lessons

  • Understanding Error Handling
  • Using Try..Catch to capture terminating errors
  • Controlling script loading pre-requisites

After completing this module, learners will be able to:

  • Describe the shell’s default error response mechanisms.
  • Understand how to use Try..Catch..Finally with a single catch block.
  • Understand how to use Try..Catch..Finally with multiple catch blocks.
  • Control potential script loading errors based on pre-required elements being in place, like PowerShell Version, PowerShell Edition, module availability etc.

Module 6: Doing More with CmdletBinding

Overview

In this module learners will learn about some of the extra functionality that is provided by using the Cmdletbinding attribute in your scripts and functions, such as implementing support for the Whatif and Confirm Parameters, supporting positional Parameters and Creating and using multiple Parameter sets.

Lessons

  • What is CmdletBinding
  • Implementing ShouldProcess and ConfirmImpact
  • Cmdletbinding and Positional Parameters
  • Creating Multiple Parameter Sets

After completing this module, learners will be able to:

  • Describe the use of the CmdletBinding attribute
  • Know how to amend custom functions to support –WhatIf and –Confirm.
  • Override default positional parameters
  • Create custom positional parameters
  • Define a default parameter set when using multiple parameter sets.
  • Create Multiple parameter sets

Module 7: Script Debugging

Overview

In this module, learners will learn how to use native Windows PowerShell features to analyze and debug existing scripts. These skills are also useful when students have to debug their own scripts.

Lessons

  • Debugging in PowerShell
  • Analysing and debugging an existing script

After completing this module, learners will be able to:

  • Describe the debugging features of Windows PowerShell.
  • Use the debugging features in the Windows PowerShell ISE
  • Use the debugging features in Visual Studio Code
  • Analyse and debug an existing script.

Module 8: Creating Controller Scripts

Overview

In this module, learners will learn how to combine tools, which are advanced functions that perform a specific task, and a controller script, which provides a user interface or automates a business process.

Lessons

  • Understanding Controller Scripts
  • Writing controller scripts that show a user interface

After completing this module, learners will be able to:

  • Describe the difference between tools and controller scripts.
  • Write controller scripts that present a user interface.
  • Write controller scripts, Text and GUI, to automate a business process.

Module 9: Proxy functions

Overview

A proxy function acts as a wrapper around an existing function, cmdlet, or other command. In its simplest form, a proxy function passes all parameter input through to the wrapped command. Proxy functions are commonly used to add parameters, remove parameters, or otherwise expand or restrict the underlying command, becoming a useful tool for delegated administration.

Lessons

  • Using Proxy Functions
  • What is a Proxy Function
  • Proxy Functions background knowledge
  • Creating a Proxy Function Template
  • Creating a Proxy Function

After completing this lesson, learners will be able to:

  • Explain what a proxy function is.
  • Describe the use of a proxy function.

Read more +

Why choose QA

Dates & Locations

Need to know

Frequently asked questions

How can I create an account on myQA.com?

There are a number of ways to create an account. If you are a self-funder, simply select the "Create account" option on the login page.

If you have been booked onto a course by your company, you will receive a confirmation email. From this email, select "Sign into myQA" and you will be taken to the "Create account" page. Complete all of the details and select "Create account".

If you have the booking number you can also go here and select the "I have a booking number" option. Enter the booking reference and your surname. If the details match, you will be taken to the "Create account" page from where you can enter your details and confirm your account.

Find more answers to frequently asked questions in our FAQs: Bookings & Cancellations page.

How do QA’s virtual classroom courses work?

Our virtual classroom courses allow you to access award-winning classroom training, without leaving your home or office. Our learning professionals are specially trained on how to interact with remote attendees and our remote labs ensure all participants can take part in hands-on exercises wherever they are.

We use the WebEx video conferencing platform by Cisco. Before you book, check that you meet the WebEx system requirements and run a test meeting (more details in the link below) to ensure the software is compatible with your firewall settings. If it doesn’t work, try adjusting your settings or contact your IT department about permitting the website.

How do QA’s online courses work?

QA online courses, also commonly known as distance learning courses or elearning courses, take the form of interactive software designed for individual learning, but you will also have access to full support from our subject-matter experts for the duration of your course. When you book a QA online learning course you will receive immediate access to it through our e-learning platform and you can start to learn straight away, from any compatible device. Access to the online learning platform is valid for one year from the booking date.

All courses are built around case studies and presented in an engaging format, which includes storytelling elements, video, audio and humour. Every case study is supported by sample documents and a collection of Knowledge Nuggets that provide more in-depth detail on the wider processes.

When will I receive my joining instructions?

Joining instructions for QA courses are sent two weeks prior to the course start date, or immediately if the booking is confirmed within this timeframe. For course bookings made via QA but delivered by a third-party supplier, joining instructions are sent to attendees prior to the training course, but timescales vary depending on each supplier’s terms. Read more FAQs.

When will I receive my certificate?

Certificates of Achievement are issued at the end the course, either as a hard copy or via email. Read more here.

Let's talk

A member of the team will contact you within 4 working hours after submitting the form.

By submitting this form, you agree to QA processing your data in accordance with our Privacy Policy and Terms & Conditions. You can unsubscribe at any time by clicking the link in our emails or contacting us directly.