Paths

Windows PowerShell: Scripting and Toolmaking

Authors: Jeff Adkin, Adam Bertram, Robert Cain, Vlad Catrinescu, Josh Duffney, Jeff Hicks, Don Jones, Thomas Lee

With a solid foundation in PowerShell essentials, you’ll be able to move immediately into this path which covers the more advanced PowerShell topics of scripting and toolmaking.... Read more

Beginner

These courses cover the fundamentals and best practices for PowerShell scripting and toolmaking.

PowerShell Toolmaking Fundamentals

by Adam Bertram

May 23, 2015 / 3h 55m

3h 55m

Start Course
Description

PowerShell can be many things to many different people. PowerShell can be a simple command-line replacement or a scripting language. Beginners to intermediate-level scripters are probably still writing one-liners and simple scripts. They're probably starting to see the potential of PowerShell not as a simple scripting language but as a way to build "tools" to use over and over again. Don't recreate the wheel. Learn how to create reusable scripts so you don't have to recreate that wheel.

Table of contents
  1. Introduction5m
  2. Moving from the Console to a Script17m
  3. Tool #1: Active Directory Account Management Automator1h 10m
  4. Tool #2: Log Investigator32m
  5. Tool #3: File and Folder Management Automator57m
  6. Debugging Techniques29m
  7. Use Modules to Create a Tool Belt21m

Building Advanced PowerShell Functions and Modules

by Adam Bertram

Dec 23, 2015 / 4h 0m

4h 0m

Start Course
Description

In this course, we are going to cover nearly everything there is to know about advanced functions and modules. Overall, this course can be broken down into six main components: differences between basic and advanced functions, advanced functions and how to build them, leveraging the PowerShell pipeline in your advanced functions, how to build safeguards into your functions with WhatIf and Confirm support, building and managing script and manifest modules, and, finally, writing help content for both your advanced functions and modules.

Table of contents
  1. Building Advanced Functions29m
  2. Understanding Advanced Function Parameters44m
  3. Incorporating Advanced Pipeline Input34m
  4. Playing It Safe with WhatIf and Confirm27m
  5. Building and Managing Script Modules24m
  6. Building a Manifest Module36m
  7. Writing Help Content44m

Windows PowerShell Best Practices and Patterns

by Don Jones

Nov 10, 2014 / 2h 55m

2h 55m

Start Course
Description

Windows PowerShell MVP Don Jones helps you take your Windows PowerShell skills to a new, more professional level through the application of best practices and patterns. Developed and vetted by the overall PowerShell community, these patterns focus on maintainability, reliability, and conformance with native PowerShell approaches. Designed for administrators who are developing mission-critical and production-use PowerShell scripts, these patterns will help you - and your scripts - be taken more seriously.

Table of contents
  1. Introduction8m
  2. Providing Help41m
  3. Managing Version Compatibility10m
  4. Performance Practices14m
  5. Code Aesthetics21m
  6. Managing Output15m
  7. Script Design Patterns33m
  8. Pure PowerShell14m
  9. Handling Errors16m

Intermediate

These courses begin branching out into more advanced PowerShell topics including reporting with PowerShell HTML, debugging PowerShell in VS Code, remoting fundamentals, and accessing SQL Server databases from PowerShell.

Reporting with PowerShell HTML and Enhanced HTML

by Vlad Catrinescu

Jan 13, 2018 / 1h 18m

1h 18m

Start Course
Description

PowerShell is an awesome tool, and as an IT pro or a Developer you probably want to use its powerful automation potential to automate your own tasks. One of the most common tasks PowerShell is used for, is to create reports with information from all over the Microsoft ecosystem. In Reporting with PowerShell HTML and Enhanced HTML you will first learn what HTML files are, and why they are the best medium to display your reports. Next, you will explore how to use the out-of-the-box ConvertTo-HTML PowerShell cmdlet to export PowerShell objects to HTML. Finally, you will discover how to use the Enhanced HTML2 PowerShell module to create beautiful looking reports, with advanced features such as conditional formatting depending on values inside the PowerShell object. When you're finished with this course, you will have the skills and knowledge of PowerShell needed to create HTML reports in PowerShell.

Table of contents
  1. Course Overview1m
  2. Course Introduction4m
  3. Creating Reports with the ConvertTo-Html cmdlet36m
  4. Creating Reports with EnhancedHTML230m
  5. Course Conclusion5m

Debugging PowerShell in VS Code

by Josh Duffney

Dec 6, 2017 / 1h 28m

1h 28m

Start Course
Description

Many people do not take the time required to become proficient at debugging. They believe it's not worth the time investment. What they don't realize is that mastering debugging actually saves them a lot more time than they would put in. In this course, Debugging PowerShell in VS Code, you'll learn the mental process behind debugging. First, you'll learn how to debug with Visual Studio Code. Next you'll be introduced to Pester, a testing framework for PowerShell. Finally, you'll discover how to take advantage of the advanced debugging features in Visual Studio Code such as watches, call stacks, and conditional breakpoints. After you've finished the course, you'll have the knowledge required to be a proficient debugger of PowerShell code.

Table of contents
  1. Course Overview0m
  2. Understanding Debugging17m
  3. Getting Started with the Debugger24m
  4. Debugging PowerShell Scripts, Functions, and Modules31m
  5. Debugging Pester Tests15m

PowerShell Remoting Fundamentals

by Jeff Hicks

Jan 7, 2016 / 4h 2m

4h 2m

Start Course
Description

This course is targeted for IT Pros and is intended to provide the viewer all the information they need to know to get started with PowerShell Remoting and how it can make their jobs easier. The goal is to provide coverage of fundamental PowerShell remoting concepts and practices that the majority of IT Pros are likely to use in their day to day work including topics like TrustedHosts, SSL connections, and Disconnected Sessions. The course is designed to follow a typical Windows administrator, Stephanie, who wants to learn how to use PowerShell remoting to do her job more efficiently. You will shadow her progress as she learns how to set up and use PowerShell remoting. Live demonstrations will depict her learning experiences, including likely mistakes. The goal is for you to put yourself into Stephanie's place and learn as she does. This course assumes the user has some basic PowerShell skills and experience and is looking to take advantage of PowerShell remoting in their day to day work.

Table of contents
  1. Course Introduction1m
  2. Introduction and Lab Setup12m
  3. Remoting Concepts and Terminology24m
  4. Setting up PowerShell Remoting21m
  5. One to One Remoting22m
  6. One to Many Remoting31m
  7. Configuring PowerShell Remoting with SSL24m
  8. PowerShell Remoting Security25m
  9. Implicit Remoting15m
  10. Disconnected Sessions23m
  11. Troubleshooting PowerShell Remoting26m
  12. PowerShell Remoting: Next Steps13m

Accessing SQL Server Databases from PowerShell

by Vlad Catrinescu

Oct 4, 2017 / 55m

55m

Start Course
Description

PowerShell is an awesome tool, and as an IT pro or a Developer you probably want to use its powerful automation potential to automate your own tasks. SQL Server is the database software of choice for organizations running in the Microsoft ecosystem. Instead of storing information from your PowerShell scripts in CSV or text files, you can store this information into a SQL Database and then use SQL Server's powerful reporting tools to create beautiful looking reports and historical data. In this course, Accessing SQL Server Databases from PowerShell, you'll learn how to use PowerShell to read and write data from/to a SQL Server database. First, you'll discover how to get the required PowerShell Module and how to connect to both a local and a remote SQL Server. Next, you'll explore how to use PowerShell to read data from a SQL Table. Finally, you'll learn how to use PowerShell to write information to an existing, or a brand-new SQL database. When you're finished with this course, you'll have the skills and knowledge of PowerShell needed to access SQL Server databases from PowerShell.

Table of contents
  1. Course Overview1m
  2. Course Introduction4m
  3. Connecting to SQL Server19m
  4. Reading Data from a SQL Database11m
  5. Writing Information into a SQL Database13m
  6. Course Conclusion4m

Advanced

These courses finish off the path by offering you advanced uses and integrations for PowerShell. This will include crossover courses featuring WPF and Pester.

Building PowerShell GUIs in WPF for Free

by Jeff Adkin

Sep 23, 2016 / 2h 21m

2h 21m

Start Course
Description

At the core of creating PowerShell UIs is a thorough knowledge of Windows Presentation Framework. In this course, Building PowerShell GUIs in WPF for Free, you will learn how to create UIs for your PowerShell scripts. You will first learn how to create WPF XAML and import that into PowerShell. Then, you'll learn about the controls and spending some time working with them. Finally, you'll learn how to create executable PowerShell scripts with UIs for redistribution. When you're finished with this course, you will have a foundational knowledge of creating UIs in WPF for PowerShell that will help you as you move forward to creating your own UIs for your PowerShell scripts.

Table of contents
  1. Course Overview1m
  2. Understanding Basic WPF UI24m
  3. Working with WPF Controls23m
  4. Creating an Event Viewer26m
  5. Creating a GUI in XAML Using Visual Studio33m
  6. Creating a Full Executable Program32m

Testing PowerShell with Pester

by Robert Cain

Jun 17, 2016 / 4h 11m

4h 11m

Start Course
Description

Having a good testing framework will ensure your PowerShell scripts function as designed, and will ensure they continue to work correctly after you make changes. In this course, Testing PowerShell with Pester, you'll learn how to use Pester, the new open source testing tool, to create tests for all of your PowerShell scripts and modules. You'll start with seeing how to use Pester to test an existing code base. After that, Pester will be used to validate change requests to a module. Finally, you'll use Pester along with Test Driven Development to craft a brand new module. After watching this course, you'll have the confidence to test and use your own PowerShell scripts in your own projects.

Table of contents
  1. Introduction to Unit Testing17m
  2. Implementing Your First Pester Tests25m
  3. Basic Function Testing with Pester41m
  4. Growing Your Pester Skills Advanced Function Testing40m
  5. Verifying Changes to Existing Scripts with Pester Tests37m
  6. Creating New Scripts with Test Driven Development, Part 144m
  7. Creating New Scripts with Test Driven Development, Part 245m

Infrastructure Testing with Pester

by Adam Bertram

Jan 5, 2017 / 2h 52m

2h 52m

Start Course
Description

Writing a small script, waiting to see if it errors out and then eyeballing the results are common. But are you sure that script you created actually did everything you intended? It's important to understand just because a script doesn't output an error and your manual eyeballing sees no problems doesn't actually mean there isn't one. In this course, Infrastructure Testing with Pester, you'll go from guessing the infrastructure changes that you made to seeing if they did actually change. First, you'll discover how to write the right tests. Next, you'll explore the infrastructure dependencies. Finally, you'll learn how to build a web dashboard. By the end of this course, you'll have a better understanding on infrastructure testing with Pester.

Table of contents
  1. Course Overview1m
  2. Introduction to Testing and Pester25m
  3. Implementing Your First Infrastructure Test with Pester9m
  4. Validating Infrastructure Changes in Pester58m
  5. Working with Dependencies1h 1m
  6. Building a Testing Report Dashboard16m

Windows Workflows with PowerShell

by Thomas Lee

Aug 2, 2016 / 2h 31m

2h 31m

Start Course
Description

Workflows are used to execute long-running and restartable scripts that are a bother to run individually--they can greatly increase your productivity. This course, Windows Workflows with PowerShell, you'll learn how to use PowerShell workflows to help you do your work more efficiently. You'll first begin by learning about different workflows and how to write and run them with Windows PowerShell. Next, you'll look at some of the issues that might arise when you convert a script or set of scripts into a workflow. Finally, you'll learn how to convert a set of scripts to a workflow. By the end of this course, you'll have the resources to understand Windows workflows with PowerShell and you'll be able to work faster then ever.

Table of contents
  1. Course Overview1m
  2. An Overview to Workflows and PowerShell16m
  3. Building Workflows Using PowerShell41m
  4. Running PowerShell Workflows44m
  5. Progressing from Function to Workflow25m
  6. Troubleshooting Workflows21m

Working with CSV Data in PowerShell

by Vlad Catrinescu

May 26, 2017 / 51m

51m

Start Course
Description

PowerShell is an awesome tool, and as an IT pro you probably want to use its powerful automation potential to automate your own tasks. To efficiently automate processes, you will need to use input files, because it's not really automation if you need to give it a manual input for every single process you want to run. In this course, Working with CSV Data in PowerShell, you will learn how to work with CSV files in your PowerShell scripts. First, you will learn what CSV files are, and why/when you should use them. Next, you'll learn how to get information with PowerShell and output it to a CSV file. Finally, you'll learn how to use CSV files as input files for your PowerShell scripts. When you're finished with this course, you will have the skills and knowledge of PowerShell needed to work with CSV data in PowerShell.

Table of contents
  1. Course Overview1m
  2. Introduction to CSV9m
  3. Exporting Information to CSV26m
  4. Importing Information from CSV11m
  5. Course Conclusion3m

Working with XML Data in PowerShell

by Vlad Catrinescu

Sep 8, 2017 / 1h 8m

1h 8m

Start Course
Description

PowerShell is an awesome tool, and as an IT pro or a Developper you probably want to use its powerful automation potential to automate your own tasks. To efficiently automate processes, you'll need to use input files, because it's not really automation if you need to give it a manual input for every single process you want to run. In this course, Working with XML Data in PowerShell, you'll learn how to work with XML files in your PowerShell scripts. First, you'll discover what XML files are, their synthax, and why/when you should use them. Next, you'll explore how to get information with PowerShell and output it to a XML file. Finally, you'll learn how to use XML files as input files for your PowerShell scripts. When you're finished with this course, you'll have the skills and knowledge of PowerShell needed to work with XML data in PowerShell.

Table of contents
  1. Course Overview1m
  2. Introduction11m
  3. Exporting Information to XML22m
  4. Importing Information from XML27m
  5. Course Conclusion3m

What you will learn

  • Toolmaking fundamentals
  • Building advanced PowerShell functions and modules -Best practices for PowerShell usage
  • Reporting with PowerShell HTML
  • Debugging PowerShell in VS Code
  • Getting a grasp of PowerShell remoting fundamentals
  • Accessing SQL Server databases with PowerShell
  • Building PowerShell GUIs in WPF
  • Testing PowerShell with Pester
  • Utilizing Windows Workflows with PowerShell

Pre-requisites

A solid comprehension of core PowerShell features and techniques. Otherwise, viewing the Microsoft PowerShell Essentials path is recommended.