Errata

PowerShell Cookbook

Errata for PowerShell Cookbook

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
2.5 section
immediately after 'Solution'



It is typed as 'Usei' instead of 'Use'. Please check.
We see 'Usei the ForEach-Object cmdlet' may be it should be 'Use the ForEach-Object cmdlet'

manikanth  Mar 19, 2023 
Printed Page 3
Third paragraph

If you want to ...for automation and other *adminstration* tasks, you will ...

Administration is missing an 'i'.

Patrick Williamson  Dec 22, 2021 
Printed Page 70
Two inches up from the bottom

Powershell Bookbook 4th edition, June 2021 (Thanks, Lee!), I am running Powershell Version 7.1.3

So, when following the instructions in Chapter 1.29 on page 70 as follows,

PS> install-module PowerShellCookbook -Scope CurrentUser

I pick (A) for install-all

here is the message which then appears:

The following commands are already available on this system:'Format-Hex,Get-Clipboard,New-SelfSignedCertificate,Send-MailMessage,Set-Clipboard'. This module 'PowerShellCookbook' may override the existing commands. If you still want to install this module 'PowerShellCookbook', use
| -AllowClobber parameter.<<


My question about Get-Clipbard, Set-Clipboard, Send-MailMessage, etc, is, will the PowershellCookbook module improve these commands, or take them back to a more-buggy version, or do nothing?

I wanted to use Watch-Command (Chapter 1.7 Monitor a Command for changes), and gain full advantage of the latest Powershell Wisdom, but I don’t want to wreck my setup!

Thank you!

George

George Girton  Jul 27, 2021 
Printed Page 357
Recipe 12.5, Solution Paragraph,

Recipe 12.5 Parse and Analyze a Web Page from the Internet describes how to use the Invoke-WebRequest cmdlet to download a page by accessing the ParsedHtml property of the HtmlResponseObject that Invoke-WebRequest returns.

The issue is that Invoke-WebRequest now only supports basic HTML Parsing Invoke-WebRequest returns a BasicHtmlWebResponseObject object and the ParsedHtml property has been removed.

If I'm wrong on this I'd love to know about it. I've been wanting to learn PowerShell for a while now and within a few days I feel like I've been able to learn quite a bit.
I came across this when I was trying to retrieve some html values from a page and the solution didn't work as planned. I haven't found a way that works so if there is one it would be great to hear back.

Jorge  Aug 06, 2021