Learn PowerShell in a Month of Lunches
Covers Windows, Linux, and macOS
Travis Plunk, Tyler Leonhardt, Don Jones, Jeffery Hicks
  • MEAP began September 2019
  • Publication in Early 2021 (estimated)
  • ISBN 9781617296963
  • 375 pages (estimated)
  • printed in black & white

Not only for MacOS and Linux users, but also a great resource for Windows PS users.

Bruce Bergman
Learn PowerShell in a Month of Lunches: Covers Windows, Linux, and macOS is a task-focused tutorial for administering Linux and macOS systems using Microsoft PowerShell. Adapted by PowerShell team members Travis Plunk and Tyler Leonhardt from the bestselling Learn Windows PowerShell in a Month of Lunches by community legends Don Jones and Jeffrey Hicks, it features Linux-based examples covering core language features and admin tasks. Designed for busy IT professionals, this innovative guide will take you from the basics to PowerShell proficiency through 25 tutorials you can do in your lunch break.

About the Technology

The PowerShell scripting language and administrative shell was initially created for Windows, providing a high-quality command-line interface and awesome automation features. As part of Microsoft’s ongoing strategy to support non-Windows platforms with its Azure cloud service and .NET Core framework, PowerShell now runs on Linux and macOS. Like Bash, PowerShell can execute and script nearly any aspect of Linux, so you can easily manage repetitive daily tasks, servers, Cloud resources, Continuous Integration pipelines, and more. Because PowerShell is a full-featured programming language, however, it provides capability well beyond traditional shell scripting languages, such as the ability to treat OS components as objects.

About the book

Learn PowerShell in a Month of Lunches: Covers Windows, Linux, and macOS is a user-friendly tutorial to managing Linux and macOS systems with PowerShell. It’s based on the bestselling Learn Windows PowerShell in a Month of Lunches, which has introduced PowerShell to nearly 100,000 readers. You’ll learn how PowerShell shapes up to Bash or Python scripting as you write and run simple scripts that automate boring daily tasks. As you progress through the book, you’ll use PowerShell to write Continuous Integration Pipelines and manage cloud-based servers. Just set aside one hour a day for a month, and you'll be automating tasks faster than you ever thought possible!
Table of Contents detailed table of contents

1 Before you begin

2 Meet PowerShell

2.1 PowerShell on macOS

2.1.1 Installation on macOS

2.2 PowerShell on Linux (Ubuntu 18.04)

2.2.1 Installation on Ubuntu 18.04

2.3 Visual Studio Code & the PowerShell extension

2.3.1 Installing Visual Studio Code and the PowerShell extension

2.3.2 Getting familiar with Visual Studio Code

2.3.3 Customizing Visual Studio Code and the PowerShell extension

2.4 It’s typing class all over again

2.5 What version is this?

2.6 Lab

3 Using the help system

3.1 The help system: how you discover commands

3.2 Updatable help

3.3 Asking for help

3.4 Using help to find commands

3.5 Interpreting the help

3.5.1 Parameter sets and common parameters

3.5.2 Optional and mandatory parameters

3.5.3 Positional parameters

3.5.4 Parameter values

3.5.5 Finding command examples

3.6 Accessing “about” topics

3.7 Accessing online help

3.8 Lab

3.9 Lab answers

4 Running commands

4.1 Not scripting, but running commands

4.2 The anatomy of a command

4.3 The cmdlet naming convention

4.4 Aliases: nicknames for commands

4.5 Taking shortcuts

4.5.1 Truncating parameter names

4.5.2 Using parameter name aliases

4.5.3 Using positional parameters

4.6 Support for external commands

4.7 Dealing with errors

4.8 Common points of confusion

4.8.1 Typing cmdlet names

4.8.2 Typing parameters

4.9 Lab

5 Working with providers

5.1 What are providers?

5.2 Understanding how the filesystem is organized

5.3 Navigating the filesystem

5.4 Using wildcards and literal paths

5.5 Working with other providers

5.6 Lab

5.7 Further exploration

5.8 Lab answers

6 The pipeline: connecting commands

6.1 Connecting one command to another: less work for you

6.2 Exporting to a CSV or an XML file

6.2.1 Exporting to CSV

6.2.2 Exporting to JSON

6.2.3 Exporting to XML

6.2.4 Comparing files

6.3 Piping to a file

6.4 Converting to HTML

6.5 Using cmdlets that modify the system: killing processes

6.6 Common points of confusion

6.7 Lab

6.8 Lab answers

7 Adding commands

7.1 How one shell can do everything

7.2 Extensions: finding and installing modules

7.3 Extensions: finding and adding modules

7.4 Command conflicts and removing extensions

7.5 Playing with a new module

7.6 Common points of confusion

7.7 Lab

7.8 Lab answers

8 Objects: data by another name

8.1 What are objects?

8.2 Understanding why PowerShell uses objects

8.3 Discovering objects: Get-Member

8.4 Using object attributes, or properties

8.5 Using object actions, or methods

8.6 Sorting objects

8.7 Selecting the properties you want

8.8 Objects until the end

8.9 Common points of confusion

8.10 Lab

8.11 Lab answers

9 A practical interlude

9.1 Defining the task

9.2 Finding the commands

9.3 Learning to use the commands

9.4 Tips for teaching yourself

9.5 Lab

9.6 Lab answer

10 The pipeline, deeper

10.1 The pipeline: enabling power with less typing

10.2 How PowerShell passes data down the pipeline

10.3 Plan A: pipeline input ByValue

10.4 Plan B: pipeline input ByPropertyName

10.5 Working with Azure PowerShell

10.6 Parenthetical commands

10.7 Extracting the value from a single property

10.8 Lab

10.9 Further exploration

10.10 Lab answers

11 Formatting—​and why it’s done on the right

11.1 Formatting: making what you see prettier

11.2 Working with the default formatting

11.3 Formatting tables

11.4 Formatting lists

11.5 Formatting wide lists

11.6 Creating custom columns and list entries

11.7 Going out: to a file or the host

11.8 Another out: GridViews

11.9 Common points of confusion

11.9.1 Always format right

11.9.2 One type of object at a time, please

11.10 Lab

11.11 Further exploration

11.12 Lab answers

12 Filtering and comparisions

12.1 Making the shell give you just what you need

12.2 Filtering left

12.3 Using comparison operators

12.4 Filtering objects out of the pipeline

12.5 Using the iterative command-line model

12.6 Common points of confusion

12.6.1 Filter left, please

12.6.2 When $_ is allowed

12.7 Lab

12.8 Further exploration

12.9 Lab answers

13 Remote controls: One to one, and one to many

13.1 The idea behind remote PowerShell

13.2 Setup PSRP over SSH

13.3 PSRP over SSH overview

13.4 Using Enter-PSSession and Exit-PSSession for one-to-one remoting

13.5 Using Invoke-Command for one-to-many remoting

13.6 Differences between remote and local commands

13.6.1 Deserialized objects

13.6.2 Local vs. remote processing

13.7 But wait, there’s more

13.8 Common points of confusion

13.9 Lab

13.10 Further exploration

13.11 Lab answers

14 Multitasking with background jobs

15 Working with many objects, one at a time

16 Variables: A place to store your stuff

17 Input and output

18 Sessions: Remote control with less work

19 You call this scripting?

20 Improving your parameterized script

21 Using regular expressions to parse text files

22 Using someone else’s script

23 Adding logic and loops

24 Handling errors

25 Debugging techniques

26 Tips, tricks and techniques

27 Never the end

28 PowerShell cheat sheet

What's inside

  • Why you should use PowerShell on Linux and macOS
  • Background jobs and automation techniques
  • Simple scripting to automate repetitive daily tasks
  • Common syntax and commands cheat sheet
  • Each lesson takes you an hour or less

About the reader

For IT professionals comfortable administering Windows or Linux. No previous experience with PowerShell or Bash required.

About the authors

Travis Plunk has been a Software Engineer on various PowerShell teams since 2013, and at Microsoft since 1999. He was involved in open sourcing PowerShell and has worked on the project full time since shortly after the project was announced.

Tyler Leonhardt has been a Software Engineer on the PowerShell team since 2017, and at Microsoft since 2016. He is a core maintainer of the PowerShell extension for Visual Studio Code.

Learn Windows PowerShell in a Month of Lunches was written by PowerShell community legends Don Jones and Jeffrey Hicks, who have years of experience as successful PowerShell trainers.

placing your order...

Don't refresh or navigate away from the page.
Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
print book $19.99 $39.99 pBook + eBook + liveBook
Additional shipping charges may apply
Learn PowerShell in a Month of Lunches (print book) added to cart
continue shopping
go to cart

eBook $15.99 $31.99 3 formats + liveBook
Learn PowerShell in a Month of Lunches (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.

FREE domestic shipping on three or more pBooks