0% found this document useful (0 votes)
273 views8 pages

Advanced PowerShell Automation Course

This 3-day course teaches advanced Windows PowerShell scripting skills like creating advanced functions, writing controller scripts, handling errors, and using DSC and JEA. The course contains 8 modules that cover topics such as parameterizing commands, .NET and REST APIs, XML/JSON data, debugging, and workflows. Students should have foundational PowerShell knowledge and experience with Windows administration.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
273 views8 pages

Advanced PowerShell Automation Course

This 3-day course teaches advanced Windows PowerShell scripting skills like creating advanced functions, writing controller scripts, handling errors, and using DSC and JEA. The course contains 8 modules that cover topics such as parameterizing commands, .NET and REST APIs, XML/JSON data, debugging, and workflows. Students should have foundational PowerShell knowledge and experience with Windows administration.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1

About this course

Course Title: Course 10962C: Advanced Automated Administration With


Windows PowerShell

Audience(s): IT Professionals

Technology: Windows Server

Level: Advanced

This Revision: C

Delivery method: Classroom

Length: 3 days

Language(s): English

First published: 01 September 2017

Overview

About this course


This is a three-day course that will teach students how to automate administrative tasks
using Windows PowerShell 5.1. Students will learn core scripting skills such as creating
advanced functions, writing controller scripts, and handling script errors. Students will learn
how to works with Windows PowerShell Workflow, the REST API and XML and JSON
formatted data files, Students will also learn how to use new administration tools such
Desired State Configuration (DSC) and Just Enough Administration (JEA) to configure and
secure servers.
2

Audience profile
This course is intended for IT professionals who are experienced in general Windows
Server and Windows Client administration. Students should have a foundational knowledge
of Windows PowerShell, which they can obtain by taking course 10961C: Automating
Administration with Windows PowerShell.

In addition, this course provides scripting guidance for developers who support
development environments and deployment processes.

At course completion
After completing this course, students will be able to:
• Create advanced functions.
• Use Microsoft .NET Framework and REST API in Windows PowerShell.

• Write controller scripts.


• Handle script errors.
• Use XML, JSON, and custom formatted data.

• Enhance server management with Desired State Configuration and Just Enough
Administration.
• Analyze and debug scripts
• Understand Windows PowerShell workflow.

Course details

Course Outline

Module 1: Creating advanced functions


This module explains how to parameterize a command into an advanced function.

Lessons
• Converting a command into an advanced function
• Creating a script module
• Defining parameter attributes and input validation
• Writing functions that accept pipeline input
3

• Producing complex pipeline output


• Documenting functions by using comment-based help

• Supporting –WhatIf and -Confirm

Lab : Converting a command into an advanced function


• Converting a command into an advanced function

Lab : Creating a script module


• Creating a script module

Lab : Defining parameter attributes and input validation


• Defining parameter attributes and input validation

Lab : Writing functions that accept pipeline input


• Writing functions that accept pipeline input

Lab : Producing complex pipeline output


• Producing complex pipeline output

Lab : Documenting functions by using comment-based help


• Documenting functions by using comment-based help

Lab : Supporting –WhatIf and -Confirm


• Supporting –WhatIf and -Confirm

After completing this module, students will be able to:


• Convert a command into an advanced function.
• Create a script module.
• Define parameter attributes and input validation.
• Write functions that accept pipeline input.
• Produce complex pipeline output.
• Document functions by using comment-based help.

• Support -WhatIf and -Confirm.


4

Module 2: Using Microsoft .NET Framework and REST API in Windows PowerShell
This module explains how to use Microsoft .NET Framework and REST API to supplement
functionality that Windows PowerShell commands provide.

Lessons
• Using Microsoft .NET Framework in Windows PowerShell
• Using REST API in Windows PowerShell

Lab : Using Microsoft .NET Framework in Windows PowerShell


• Using Microsoft .NET Framework in Windows PowerShell

Lab : Using REST API in Windows PowerShell


• Using REST API in Windows PowerShell

After completing this module, students will be able to:


• Use Microsoft .NET Framework in Windows PowerShell.

• Use REST API in Windows PowerShell.

Module 3: Writing controller scripts


This module explains how to combine advanced functions that perform a specific task and a
controller script that provides a user interface or automates a business process.

Lessons
• Introducing controller scripts
• Writing controller scripts that display a user interface
• Writing controller scripts that produce reports

Lab : Writing controller scripts


• Writing controller scripts that display a user interface
• Writing controller scripts that implement a text-based menu
5

Lab : Writing controller scripts that produce HTML reports


• Writing functions to be used in the controller script

• Writing a controller script that produces HTML reports

After completing this module, students will be able to:


• Describe controller scripts.
• Write controller scripts that display a user interface.
• Write controller scripts that produce reports.

Module 4: Handling script errors


This module explains how to perform basic error handling in scripts.

Lessons
• Understanding error handling
• Handling errors and timeouts in a script

Lab : Handling errors in a script


• Handling errors in a script

After completing this module, students will be able to:


• Describe error handling.
• Handle errors and timeouts in a script.

Module 5: Using XML, JSON, and custom-formatted data


This module explains how to read, manipulate, and write data in XML and JSON format.

Lessons
• Reading, manipulating, and writing XML-formatted data
• Reading, manipulating, and writing JSON-formatted data
• Reading and manipulating custom-formatted data
6

Lab : Reading, manipulating, and writing XML-formatted data


• Testing the provided tools

• Updating an XML inventory document

After completing this module, students will be able to:


• Read, manipulate, and write XML-formatted data.
• Read, manipulate, and write JSON-formatted data.
• Read and manipulate custom-formatted data.

Module 6: Enhancing server management with Desired State Configuration and Just
Enough Administration
This module explains how to write Desired State Configuration (DSC) configuration files,
deploy those files to servers, and monitor servers’ configurations. This module also explains
how to restrict administrative access with Just Enough Administration (JEA).

Lessons
• Understanding Desired State Configuration
• Creating and deploying a DSC configuration
• Implementing Just Enough Administration

Lab : Creating and deploying a DSC configuration


• Creating and deploying a DSC configuration

Lab : Configuring and using JEA


• Configuring and using JEA

After completing this module, students will be able to:


• Understand DSC.
• Create and deploy a DSC configuration.
• Implement JEA.
7

Module 7: Analyzing and debugging scripts


This module explains how to use native Windows PowerShell features to analyze and
debug existing scripts.

Lessons
• Debugging in Windows PowerShell
• Analyzing and debugging an existing script

Lab : Analyzing and debugging an existing script


• Analyzing and debugging an existing script

After completing this module, students will be able to:


• Debug in Windows PowerShell.
• Analyze and debug an existing script.

Module 8: Understanding Windows PowerShell Workflow


This module explains the features of the Windows PowerShell Workflow technology.

Lessons
• Understanding Windows PowerShell Workflow

Lab : Creating and running a Windows PowerShell Workflow


• Creating and running a Windows PowerShell Workflow
After completing this module, students will be able to describe and implement the Workflow
feature of Windows PowerShell.
8

Prerequisites

In addition to their professional experience, students who attend this training should already
have the following technical knowledge:
• Experience with Windows networking technologies and implementation.

• Experience with Windows Server administration, maintenance, and troubleshooting.

• Experience with Windows Client administration, maintenance, and troubleshooting.

• Experience with using Windows PowerShell to run commands and to create basic
non-modularized scripts.

Students who attend this training can meet the prerequisites by obtaining equivalent
knowledge and skills through practical experience as a Windows System Administrator.
Course 10961: Automating Administration with Windows PowerShell is strongly
recommended to obtain prerequisite skills in Windows PowerShell.

Common questions

Powered by AI

Windows PowerShell scripts can manipulate XML and JSON formatted data by using specialized cmdlets such as ConvertFrom-Json, ConvertTo-Json for JSON, and the XML type accelerator for XML. These cmdlets allow scripts to read, parse, modify, and write data in these formats, facilitating complex data transformations and integrations with web services and applications .

Using Desired State Configuration (DSC) in server management helps to automate the deployment and maintenance of server configurations, ensuring consistency and compliance across a network. Just Enough Administration (JEA) enhances security by providing minimal necessary privileges to administer resources, thus reducing the risks associated with full administrative rights .

When deploying a Desired State Configuration (DSC) configuration to servers, considerations should include the current state of target servers, compatibility of configurations, potential impacts on existing services, and the mechanisms for monitoring and reporting configuration drift. Proper testing and validation of configurations should be conducted in a staging environment to mitigate risks and ensure seamless deployment .

Comment-based help is crucial for documenting scripts in Windows PowerShell, as it provides metadata about the script's purpose, parameters, and usage directly within the code. This enhances maintainability and user-friendliness by allowing users to quickly understand and utilize scripts with comprehensive inline documentation while enabling PowerShell's Get-Help cmdlet to retrieve this information .

Windows PowerShell Workflow allows for the automation of long-running and repeatable processes by enabling scripting tasks to be broken down into smaller work segments. This feature is particularly beneficial for managing stateful workflows that require complex configurations across multiple systems, enhancing efficiency and reliability in IT environments .

Advanced functions support pipeline input by accepting input objects via the pipeline using the ValueFromPipeline attribute in parameter definition. This allows for more modular and reusable scripts that can process streaming data inline, thereby enhancing script performance and reducing redundancy by allowing functions to interact seamlessly with other cmdlets and functions in a pipeline .

Windows PowerShell provides structured approaches for handling errors by using try-catch-finally blocks to capture and respond to exceptions during script execution. Additionally, specific error actions such as 'Continue', 'Stop', and 'SilentlyContinue' can be configured to control script behavior in the event of errors or timeouts, thus enhancing the robustness of scripts .

Controller scripts can be used to produce graphical or text-based user interfaces by interacting with PowerShell's GUI components, or via text-based menus for streamlined data entry and operations. They can also automate the creation of reports by collecting data, formatting it (e.g., into HTML), and presenting it for analysis, thus supporting decision-making processes .

The integration of Microsoft .NET Framework with Windows PowerShell enhances its functionality by providing additional capabilities that are not natively available in PowerShell commands. This allows users to leverage the extensive class library of .NET for tasks such as creating custom objects, manipulating data at a lower level, and accessing functionality like GUI elements and file system operations .

Students should have experience with Windows Server and Client administration, familiarity with Windows networking technologies, and basic proficiency in running commands and writing scripts in Windows PowerShell. These prerequisites are crucial because they provide foundational knowledge necessary to comprehend advanced scripting concepts, ensuring that students can effectively participate in and benefit from the course content .

You might also like