Advanced PowerShell Training

  • Learn via: Classroom
  • Duration: 3 Days
  • Level: Expert
  • Price: From €3,672+VAT
We can host this training at your preferred location. Contact us!

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.

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

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.



Contact us for more detail about our trainings and for all other enquiries!

Upcoming Trainings

Join our public courses in our Istanbul, London and Ankara facilities. Private class trainings will be organized at the location of your preference, according to your schedule.

Classroom / Virtual Classroom
26 June 2024
Istanbul, Ankara, London
€3,672 +VAT Book Now
Classroom / Virtual Classroom
27 June 2024
Istanbul, Ankara, London
3 Days
Classroom / Virtual Classroom
03 July 2024
Istanbul, Ankara, London
3 Days
Classroom / Virtual Classroom
04 July 2024
Istanbul, Ankara, London
3 Days
Classroom / Virtual Classroom
08 July 2024
Istanbul, Ankara, London
3 Days
Classroom / Virtual Classroom
10 July 2024
Istanbul, Ankara, London
€3,672 +VAT Book Now
Classroom / Virtual Classroom
05 August 2024
Istanbul, Ankara, London
3 Days
Classroom / Virtual Classroom
17 August 2024
Istanbul, Ankara, London
3 Days

Related Trainings

By using this website you agree to let us use cookies. For further information about our use of cookies, check out our Cookie Policy.