
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.
Explore the limitations of advanced functions in PowerShell by binding parameters, calling a command inside the function, and invoking it from the command line, with saving for reuse.
Convert a PowerShell script into a module, import it to expose functions as commands, deploy the module to the system, and call its functions from any session, with verbose feedback.
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.
Expand your PowerShell module to retrieve operating system, computer system, and BIOS information, save results in variables, and build a structured output for multiple devices using a pipeline.
Learn how to add comment-based help to a PowerShell function or module, including synopsis, description, parameters, and examples, and how to view it with get-help.
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.
Explore how the .NET framework is a collection of namespaces containing classes and APIs, with assemblies and a data link library delivering functionality for languages like C#, VB, and PowerShell.
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.
Deploy a PowerShell-based user interface by importing a module, looping a main screen menu, and routing choices to scripts, with execution policy checks.
PowerShell interface design for an options script focuses on prompting for computer names, calling functions, handling arrays, and looping to present a friendly report.
Build a PowerShell module to obtain network adapter details across multiple computers, gathering interfaces, IP addresses by interface index, and prepare to generate reports.
Create a PowerShell report by gathering disk and network adapter data and exporting it to a file on C drive. Use variables and functions to assemble fragments for multi-computer outputs.
Master PowerShell error handling by using try catch to detect and log terminating and non-terminating errors, and apply practical scripts for domain controllers and devices to manage errors effectively.
Learn to use try catch in PowerShell to handle errors across multiple devices with verbose output, processing each device one by one and warning when a device is offline.
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.
Learn how to save error messages and computer information to a log file in a PowerShell module, using append mode and catch blocks to handle warnings when managing multiple computers.
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.
Master an xpath demo in PowerShell 2019 by building a targeted query to extract Victoria's IP address and addresses. Save results to a variable and explore related properties and methods.
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.
Build a PowerShell lab that reads a server inventory from a file, iterates computers, and constructs an XML with addresses and IP address elements using the XML module.
Create ip address elements inside addresses for each network adapter, assign attributes (family, interface, adapter, ip address), then build and save the main inventory to the output path.
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.
Query a website via rest api and json, retrieve data, and convert it to a PowerShell object. Save results to a file and expand nested properties to select fields.
Explore handling custom formatted data in PowerShell by building and applying regular expressions, converting strings to objects, and searching for data that matches the pattern.
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.
Master regular expressions and quantifiers, including star, plus, and question mark, braces, and grouping for building precise patterns with alternation and character classes.
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 to deploy a DSC pull server, configure web services, and manage pull-based configurations, while comparing push versus pull modes and security best practices.
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.
Edit the JEA psrc file to grant restricted admins specific commands, such as restart-computer, using remote PowerShell or local notepad edits on Victoria Server 2.
Create and edit a PowerShell session configuration (pssc) for JEA, set a transcript directory, define roles, enable virtual accounts, and register the configuration to enforce restricted remote administration.
Learn how to debug PowerShell scripts, set breakpoints, and analyze existing code using debug output and remote sessions, ensuring syntax accuracy and clear documentation.
Learn to distinguish syntax errors (typos) from logical errors in PowerShell scripts. Detect syntax issues in single commands and resolve logical errors with 64-bit architecture checks in pipelines.
Discover windows powershell workflow, a specialized scripting tech using windows workflow foundation to deploy xaml workflows to remote machines, with suspend resume, parallel and sequential control.
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.