October 2017
Intermediate to advanced
440 pages
11h 47m
English
Refer to the following table:
|
Errors |
$Error |
$Error[0] # The last error |
|
Formats the enumeration limit. Dictates the number of elements displayed for objects with properties based on arrays. The default is 4. |
$FormatEnumerationLimit |
$object = [PSCustomObject]@{Array = @(1, 2, 3, 4, 5)}$object # Shows 1, 2, 3, and 4$formatenumerationlimit = 1$object # Shows 1 |
|
Holds data of the current PowerShell host. |
$Host |
$host$host.UI.RawUI.WindowTitle |
| The matches found when using the -match operator. | $Matches |
‘text’ –match ‘.*’$matches |
|
The output field separator. The default is a single space. Dictates how arrays are joined when included in an expandable string. |
$OFS |
$arr = 1, 2, 3, 4“Joined based on OFS: ... |
Read now
Unlock full access