
Master advanced Windows Server 2019 administration with hands-on PowerShell scripting, building reusable scripts, controllers, and workflows to automate tasks, manage data with XML and JSON, and enforce desired state configurations.
Learn PowerShell function types (basic, advanced, pipeline), build a script module, define parameter attributes, handle pipeline input, create structured outputs, and use what-if and confirm testing.
Convert a PowerShell command into an advanced function with a computer-name parameter to query Win32_OperatingSystem on local and remote devices.
Learn to enhance a PowerShell module by adding mandatory parameters, aliases, and a validate pattern to control inputs, display help, and reload modules for secure, user-friendly server management.
Activate the pipeline in your module and enable functions to accept pipeline input, using pipeline by property name and a process block to loop through each computer name.
Discover how to use the .NET framework and REST API to extend PowerShell, build secret and custom modules, and deploy solutions when a command is not natively available.
Power on three machines and access the server’s default web site with PowerShell and .NET framework classes to download an image and save it with the correct extension.
Learn how to build controller scripts with nested loops, handling devices and their hard disks, and create a user interface to select options and generate reports.
Demonstrate nested loops in PowerShell to process multiple computers and their disks, leveraging modules and pipeline input to retrieve and display disk information.
Master three techniques to capture and inspect PowerShell errors: the error collection, the -ErrorVariable option, and try/catch blocks, with examples showing logging and saving details.
Prepare your lab by editing the inventory XML file and setting up a PowerShell module to retrieve operating system, disk, and network adapter information for Victoria servers.
Demonstrate building and saving an XML sample in PowerShell, structuring a computers element with attributes like IP address and interface index, and retrieving specific values from the XML.
This video is taken from Course 7: Xamarin C# & PowerShell to automate network tool.
Concentrate on the concepts of XPath.
Connects the power module script with the XML main lab, updates the inventory using net IP inventory, retrieves adapter details for multiple devices, and saves results to inventory.xml.
Learn to retrieve data from rest api in PowerShell and convert to and from json using ConvertTo-Json and ConvertFrom-Json. Build PowerShell custom objects for easy processing.
Explore regular expressions to extract specific words or patterns from text, such as ip addresses or protocol names, and save the match to a variable for use in a pipeline.
Apply a regular expression in PowerShell to filter and extract specific records from server data, using variables, piping, and pattern matching to isolate entries containing Victoria.
Master DSC commands and resources in PowerShell to deploy configurations to machines using push and inspect resources with Get-Command and Get-DscResource.
Push a DSC configuration to a server to deploy the print notify service, configure a print resource with the computer name parameter and target Victoria DC1; test running state.
Discover how JEA enables delegated administration by using session configurations and endpoints to narrow permissions, specify allowed commands, and audit activities within PowerShell on Windows Server.
Learn to build a PowerShell workflow from a function, configure parameters for domain servers and domain controllers, and perform parallel or sequential restarts while capturing last boot uptime via WMI.
Course Description
This course provides students with the advanced knowledge and skills to create production-quality scripts by using Windows PowerShell. It teaches students how to automate administrative tasks by using Windows PowerShell.
Students learn core scripting skills, such as creating advanced functions, writing controller scripts, and handling script errors. Students learn how to work with Windows PowerShell workflows, the REST API, XML-formatted data files, and JavaScript Object Notation (JSON)-formatted data files. Students also learn how to use new administration tools, such as Desired State Configuration (DSC) and Just Enough Administration (JEA), to configure and help secure servers.
The course outline is as follows
Module 1, “Creating advanced functions”
Learn how to parameter a command and create an advanced function, convert a script and function into a script module, define parameter attributes and input validation for a function, enumerate objects by using scripting constructs, modify a function to accept pipeline input, produce complex pipeline output in a function, document a function by using comment-based Help, and create functions that support -WhatIf and -Confirm to parameter a command into an advanced function.
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.
Module 3, “Writing controller scripts”
Learn how to describe the difference between tools and controller scripts, write controller scripts that present a user interface, and write controller scripts that automate a business process.
Module 4, “Handling script errors”
Learn how to perform basic error handling in scripts. The module focuses on adding error handling to existing tools, primarily as a time-saving mechanism (as opposed to having students write new tools). A side benefit of this approach is that it helps build the skills needed to analyze and reuse existing code written by someone else. Topics include describing the shell’s default error response
mechanisms and adding error handling code to existing tools.
Module 5, “Using XML, JSON, and custom-formatted data”
Learn how to read, manipulate, and write data in the XML and JSON formats.
Module 6, “Enhancing server management with Desired State Configuration and Just Enough Administration”
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 by using Just Enough Administration (JEA).
Module 7, “Analyzing and debugging scripts”
Learn how to use native Windows PowerShell features to analyse and debug existing scripts. Additionally, students analyse and debug an existing script.
Module 8, "Understanding Windows PowerShell Workflow”
Learn about the features of the Windows PowerShell Workflow technology.