liveBook · Manning

Chapter 7: Adding commands

What you will learn in chapter 7 of Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

Introduces PowerShell’s extensibility through its growing set of commands for Azure products.

After this chapter you will be able to

What it builds on

Section by section

Introduction

Introduces PowerShell’s extensibility through its growing set of commands for Azure products.

Key terms: extensibility, commands, Azure portal

7.1 How one shell can do everything

This section explains how PowerShell can gain new commands through modules, using smartphone apps as an analogy.

Key terms: modules, commands, extensions

7.2 Extensions: Finding and installing modules

This section explains what PowerShell modules are and how to find, install, update, and verify modules from online repositories.

Key terms: module, snap-in, PowerShellGet, PowerShell Gallery, Register-PSRepository, Find-Module, Install-Module, Update-Module, Install-Module -Name Az, Get-Module

7.3 Extensions: Finding and adding modules

This section explains how PowerShell finds modules through PSModulePath, makes their commands available automatically, and handles modules outside those paths.

Key terms: PSModulePath, Import-Module, system modules, shared, personal modules, autodiscovery, autoloading, Tab, IntelliSense, Update-Help

7.4 Command conflicts and removing extensions

This section explains how command prefixes prevent module naming conflicts and how to access or remove commands when conflicts occur.

Key terms: prefix, noun, command conflicts, module name, command name, Get-User, Remove-Module, Import-Module, -Prefix

7.5 Playing with a new module

The section demonstrates how to explore an unfamiliar PowerShell module and use its Compress-Archive command to create a zip file.

Key terms: help system, Microsoft.PowerShell.Archive, module, Compress-Archive, -Path, -DestinationPath, mandatory parameters, -Verbose, -Force

7.6 Common points of confusion

This section explains how to avoid getting lost among module commands by narrowing the command list and reading detailed help, especially examples.

Key terms: modules, Help, Get-Command, wildcards, -Example, -Full

7.7 Lab

7.8 Lab answers

Where this is used later

Concepts explained in this chapter

← Chapter 6: The pipeline: Connecting commands Chapter 8: Objects: Data by another name →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.