January 2008
Intermediate to advanced
688 pages
19h 12m
English
There are several things you can do to ensure your scripts are as readable as possible. In this section we will look at some of the more important items.
When creating an alias, include the -description parameter, and use it when searching for your personal aliases. An example of this is shown here:
Get-Alias |
where-object { $_.description -match 'mred' } |
Format-Table -Property " ",name, definition -autosize `
-hideTableHeadersScripts should accept -help and print a help text. You can implement -help as a named parameter:
Param($help)
Alternatively, you can implement the -help parameter as a switch statement. The switch is easiest to implement:
Param([switch]$help)
All procedures should begin with a brief comment describing ...
Read now
Unlock full access