Typos in Chapter 9 Lab answers?

I tried searching the forums for this question already before making this post, but I didn’t find any threads about it. I’m reading through Learn Windows PowerShell in a Month of Lunches, Third Edition, and I believe there is a typo in the Chapter 9 Lab questions with Questions 4 and 5 which I have included below:

Lab

4. Write a command that uses pipeline parameter binding to retrieve a list of running
processes from every computer in an Active Directory (AD) domain. Don't
use parentheses.

5. Write a command that retrieves a list of installed services from every computer
in an AD domain. Don't use pipeline input; instead, use a parenthetical command
(a command in parentheses).
Lab Answers

4. Get-Service –Computername (get-adcomputer -filter * |
Select-Object –expandproperty name)

5. get-adcomputer -filter * |
➥Select-Object @{l='computername';e={$_.name}} |
➥Get-WmiObject -class Win32_BIOS

Before I looked at the Lab Answers printed in the book, here are the answers I came up with:

4. Get-ADComputer -Filter * | Select-Object @{Label='ComputerName';Expression={$_.Name}} | Get-Process

5. Get-Service -ComputerName (Get-ADComputer -Filter * | Select-Object -ExpandProperty Name)

So it seems like the book’s answer to Question 4 is actually the answer to Question 5, and the book’s answer to Question 5 is completely unrelated to Question 5, and the actual answer to Question 5 is missing. I wasn’t sure the best way to contact the authors about this, but I saw other people asking questions about the book’s labs in this forum and thought it would be helpful for anyone else later who has the same question and searches these forums. :slight_smile:

Take a look at the books preface and indexes, it will normally tell you where to send this. Of visit the publishers site, and see if there is already errata replace for what you are seeing. The books been out for a very long time, so other may have already reported it to the authors publisher.