I'm in the midst of working on 10961C, the Windows Server 2012 R2 / Windows 8.1 / PowerShell 4.0 update of Microsoft's 10961A/B course, "Automating Administration with Windows PowerShell." I anticipate this being closed out by the end of November, 2013, so if you've taken or taught this course and have any feedback - even a typo - now's the time to tell me. Drop a comment below, or e-mail me (if you have my address). Please, no Twitter replies on this one.
The course will not be substantially changed from the B rev; because PowerShell v4 doesn't change much, especially at the entry-level covered by 10961, there wasn't much to alter. But I'm trying to sweep up as many lingering bugs and typos as possible. Kudos to MCT Jason Yoder for firing over a list of fixes!
Some fun comments from the "A" rev feedback:
By day 3 (5 day class) most students felt over-whelmed.There is not enough material.
No mention of filtering functions.
The objects output by an advanced function and a filter can be the same, but filters still execute much faster for some reason. They’re worth keeping in your bag of tricks for when code needs to be optimized. I’m not suggesting they need to be in this particular course (which I know nothing about), but I wouldn’t treat filters as obsolete just yet.
I know this code will format terribly in a blog comment, but here’s a simple way to prove the difference:
function Test-AdvFunction
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[Object]
$InputObject
)
process
{
$InputObject.GetType().FullName
}
}
filter Test-Filter
{
$_.GetType().FullName
}
$array = 1..1000000
$functionResult = Measure-Command { $array | Test-AdvFunction }
$filterResult = Measure-Command { $array | Test-Filter }
Write-Host (“Function: {0:F2} seconds” -f $functionResult.TotalSeconds)
Write-Host (“Filter: {0:F2} seconds” -f $filterResult.TotalSeconds)
Results:
Function: 10.86 seconds
Filter: 1.72 seconds
I didn’t call them “obsolete,” and I’m definitely aware of their execution differences. Be that as it may, a beginner-level course that includes neither functions nor pipeline functions would also not contain filters, and were I teaching beginner-level PowerShell programming, I *still* wouldn’t include filters. Useful as they are, a course can only contain so much information, and I definitely regard filters as a more advanced artifact. The *only* reason to use one over, say, a pipeline function or advanced function is the performance thing, and that’s negligible unless you’re writing something that will deal with thousands and thousands of objects. I wouldn’t burn precious, finite class time on a construct whose sole advantage is a performance gain; I would likely *mention* it and leave it to people to explore on their own once they got to the need. My point was one of instructional design, and the post was really soliciting feedback on the course.
[…] Last chance for feedback on PowerShell course 10961A/B […]