📅  最后修改于: 2021-01-08 02:32:28             🧑  作者: Mango
首选项变量是用于自定义Windows PowerShell行为的那些变量。任何用户都可以更改这些变量的值。这些变量会影响PowerShell操作环境以及在该环境中运行的所有命令。
下表列出了首选项变量及其默认值:
Variable | Default Value |
---|---|
$ConfirmPreference | High |
$DebugPreference | SilentlyContinue |
$ErrorActionPreference | Continue |
$ErrorView | NormalView |
$FormatEnumerationLimit | 4 |
$InformationPreference | SilentlyContinue |
$LogCommandHealthEvent | False (not logged) |
$LogCommandLifecycleEvent | False (not logged) |
$LogEngineHealthEvent | True (logged) |
$LogEngineLifecycleEvent | True (logged) |
$LogProviderLifecycleEvent | True (logged) |
$LogProviderHealthEvent | True (logged) |
$MaximumHistoryCount | 4096 |
$OFS | (Space character (” “)) |
Variable | Default Value |
---|---|
$OutputEncoding | UTF8Encoding object |
$ProgressPreference | Continue |
$PSDefaultParameterValues | (None – empty hash table) |
$PSEmailServer | (None) |
$PSModuleAutoLoadingPreference | All |
$PSSessionApplicationName | WSMAN |
$PSSessionConfigurationName | http://schemas.microsoft.com/PowerShell/microsoft.PowerShell |
$PSSessionOption | See $PSSessionOption |
$VerbosePreference | SilentlyContinue |
$WarningPreference | Continue |
$WhatIfPreference | 0 |