PowerShell Help About_ Files

Windows PowerShell Help Files

PowerShell has a selection of about_ files. It’s a pity that stay these trees-of-wisdom stay in the shadows of the help for Verb-Noun cmdlets.  The purpose of this page is to alert you to the interesting information in these lesser known about_Topic files.

Topics for PowerShell Help About_ Files

 ♣

Listing All PowerShell’s About Files

# PowerShell’s About_files
Get-Help About* | Format-Wide Name -AutoSize

Note 1: Here above is a rare use for Format-Wide.

A Sample of PowerShell’s About Topics

about_Arithmetic_Operators
about_Arrays
about_Command_Precedence
about_Environment_Variables
about_For
about_Foreach
about_Functions
about_Hash_Tables
about_If
about_Logical_Operators
about_Quoting_Rules
about_Preference_Variables
about_Switch 
about_Regular_Expressions
about_Remote

Note 2: You can get a total with: (Get-Help about).count.  I make it nearly 100 ‘about_’ files in PowerShell 3.0.

The Point of Get-Help about_Topic

Each of PowerShell’s regular cmdlets, whatever their Command Type, has it’s own help file.  The problem is where does than leave help for conditional operators such as -Match, or logic structures such as ElseIf?

The answer is the information is in the respective about_file.  Each topic is full of useful advice on its syntax, and provides examples to get you started.

Guy Recommends:  A Free Trial of the Network Performance Monitor (NPM)Review of Orion NPM v11.5 v11.5

SolarWinds’ Network Performance Monitor will help you discover what’s happening on your network.  This utility will also guide you through troubleshooting; the dashboard will indicate whether the root cause is a broken link, faulty equipment or resource overload.

What I like best is the way NPM suggests solutions to network problems.  Its also has the ability to monitor the health of individual VMware virtual machines.  If you are interested in troubleshooting, and creating network maps, then I recommend that you try NPM now.

Download a free trial of Solarwinds’ Network Performance Monitor

Example of PowerShell About_

Let us see how we can get help about PowerShell’s quotation marks, here is an extract from the help file:

Get-Help About_Quoting_Rules

DESCRIPTION
Quotation marks are used to specify a literal string. You can enclose a string in single quotation marks (‘) or double quotation marks (").

Single and Double-Quoted Strings

When you enclose a string in double quotation marks (a double-quoted string), variable names that are preceded by a dollar sign ($) are replaced with the variable’s value before the string is passed to the command for processing.

For example:

$i = 5
"The value of $i is $i."

The output of this command is:
The value of 5 is 5.

However:
When you enclose a string in single-quotation marks (a single-quoted string), the string is passed to the command exactly as you type it. No substitution is performed. For example:

$i = 5
‘The value of $i is $i.’

The output of this command is:
The value $i is $i.

Get-Help about_Preference_Variables

Problem: You get interactive prompts, for example with Remove-Item.

Clear-Host
$ConfirmPreference = "Low"
$Source = "D:\Pshell"
Copy-Item -Path $Source -Destination $ClearOut -Recurse
$ClearOut = "D:\Bad Stuffs\"
Remove-Item $ClearOut -Recurse

Note 3: To get my script working change the values of the variables $Source and $ClearOut.

Note 4: This is the result of Remove-Item with $ConfirmPreference = "Low"

about_Preference_Variables

Solution: $ConfirmPreference = "None"

Result: PowerShell surpresses the above 'Confirm' dialog box.

See more about -Confirm ยป

Summary of PowerShell’s Help About_files

Windows PowerShell has a library of ‘about_ files’.  You can list their names with Help about*, then use Get-Help once more to read the individual topics.

If you like this page then please share it with your friends

 


See more Windows PowerShell tutorials

PShell Home   • Introduction   • Dreams   • 3 Key Commands   • PowerShell Help About   • Get-Help

PowerShell v 3.0   • Set-ExecutionPolicy   • Get-Command   • Cmdlet scripts   • Import-Module

PowerShell Version Check   • Backtick   • PowerShell examples   • PowerShell ISE   • Get-Member

Please email me if you have a better example script. Also please report any factual mistakes, grammatical errors or broken links, I will be happy to correct the fault.