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]@{ |
Holds data of the current PowerShell host. |
$Host |
$host |
The matches found when using the -match operator. | $Matches |
‘text’ –match ‘.*’ |
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 |
Current PowerShell process ID. |
$PID |
Get-Process –Id $PID |
Holds the path to each of the profile files. |
$PROFILE |
$profile.AllUsersAllHosts |
PowerShell version information. |
$PSVersionTable |
|
Present working directory. |
$PWD |
$PWD.Path |