Add 4.11 Lab answers immediately following 4.10 Lab.
Second bullet, line 2: remove the - sign before Application.
Add this note before the 3.7 Accessing online help section:
NOTE PowerShell is constantly evolving, so you should expect different results on different versions. For example, in PowerShell 5.1, about_common_parameters
had a name change. If you're using v5.1, can you figure out the new name?
Paragraph 3, line 4: Get-Mailbox
should be New-Mailbox
.
Lab Answers for 4.11 were omitted. They follow:
4.11 Lab Answers 1.get-process
2.get-eventlog –logname Application –newest 100
3.Get-Command -CommandType cmdlet
4.Get-Alias
5.New-Alias -Name np -Value notepad
6.Get-Service -Name m*
7.Get-NetFirewallRule
8.Get-NetFirewallRule -Direction Inbound
First bullet, line 3: Import-CLI
should be Import_CliXML
.
Delete the last sentence on the page; it's not relevant:
In chapter 7, we'll dive into the rules that govern
how commands can connect to each other.
Insert the following ntoe between the last two paragraphs:
NOTE Your help output may differ somewhat from what we show here. For example, sometimes PowerShell will start numbering positions at 0, rather than at 1. That doesn't change what we're doing.
Fourth paragraph, last line in Above and beyond sidebar: Company.com should be company.pri
Answer 4 is answer 5.
The answer to question 4 follows:
Get-ADComputer -filter * |
-> Select-Object @{n='computername';e={$_.name}} | Get-Process
Line 4 from the bottom: -columns
should be -column
. Delete the s at the end.
Code snippet at the end of the page: Replace line 3 with the following:
@{name='VM(MB)'; expression={$_.VM / 1MB};formatstring='F2'; align='right'}
Replace the last sentence on the page with the following:
This engages PowerShell's formatting operator to get us a couple of decimal places rather than limiting us to just integers, and right-aligns the results.
After the sentence immediately following Try It Now add the following sentence:
It's using the -First
or -Last
parameters.
In the fourth line from the bottom of th page, Get-Command
should be Get-Content
.
In answer 3 under 13.11 Lab answers, there should be a space before -first
: Select -first
.
Some of the numbers are incorrectly position in 14.11 Lab answers:
4. should be where 5 is; the sentence You should ... is part of 3.
5. should be 4.
6. should be 5.
6. goes with the last line get-ciminstance
...
In the second line of the last code block, $services.name
should be $($services.name)
.
PS C:\> $var = "Service names are $($services.name)"
In the first heading, 6 should be 8:
Review lab 1: chapters 1-8
First sentence under Task 5 heading should be left-aligned with the rest of the paragraph.
In Task 1 under Review Lab 1, Security
should be Application
:
Get-EventLog -LogName Application -Newest 100
In task 4, Automatic
should be Manual
:
Set-Service -Name BITS -StartupType Manual