【PowerShell首选项变量】首选项变量是用于自定义Windows PowerShell行为的那些变量。任何用户都可以更改这些变量的值。这些变量影响PowerShell操作环境以及在该环境中运行的所有命令。
下表列出了首选项变量及其默认值:
Variable |
默认值 |
$ConfirmPreference |
High |
$DebugPreference |
SilentlyContinue |
$ErrorActionPreference |
Continue |
$ErrorView |
NormalView |
$FormatEnumerationLimit |
4 |
$InformationPreference |
SilentlyContinue |
$LogCommandHealthEvent |
假(未记录) |
$LogCommandLifecycleEvent |
假(未记录) |
$LogEngineHealthEvent |
True (logged) |
$LogEngineLifecycleEvent |
真实(记录) |
$LogProviderLifecycleEvent |
真实(记录) |
$LogProviderHealthEvent |
True (logged) |
$MaximumHistoryCount |
4096 |
$OFS |
(空格字符(“
”
)) |
Variable |
默认值 |
$OutputEncoding |
UTF8Encoding object |
$ProgressPreference |
Continue |
$PSDefaultParameterValues |
(无-空哈希表) |
$PSEmailServer |
(None) |
$PSModuleAutoLoadingPreference |
All |
$PSSessionApplicationName |
WSMAN |
$PSSessionConfigurationName |
http://schemas.microsoft.com/PowerShell/microsoft.PowerShell |
$PSSessionOption |
See $PSSessionOption |
$VerbosePreference |
SilentlyContinue |
$WarningPreference |
Continue |
$WhatIfPreference |
0 |
推荐阅读