偏好变量2024年8月29日 | 1 分钟阅读 首选项变量是那些自定义 Windows PowerShell 行为的变量。 任何用户都可以更改这些变量的值。 这些变量会影响 PowerShell 运行环境以及在该环境中运行的所有命令。 下表列出了首选项变量及其默认值 变量 | 默认值 |
---|
$ConfirmPreference | 高 | $DebugPreference | SilentlyContinue | $ErrorActionPreference | Continue | $ErrorView | NormalView | $FormatEnumerationLimit | 4 | $InformationPreference | SilentlyContinue | $LogCommandHealthEvent | False (未记录) | $LogCommandLifecycleEvent | False (未记录) | $LogEngineHealthEvent | True (已记录) | $LogEngineLifecycleEvent | True (已记录) | $LogProviderLifecycleEvent | True (已记录) | $LogProviderHealthEvent | True (已记录) | $MaximumHistoryCount | 4096 | $OFS | (空格字符(" ")) |
变量 | 默认值 |
---|
$OutputEncoding | UTF8Encoding 对象 | $ProgressPreference | Continue | $PSDefaultParameterValues | (无 - 空哈希表) | $PSEmailServer | (无) | $PSModuleAutoLoadingPreference | 全部 | $PSSessionApplicationName | WSMAN | $PSSessionConfigurationName | http://schemas.microsoft.com/PowerShell/microsoft.PowerShell | $PSSessionOption | 参见 $PSSessionOption | $VerbosePreference | SilentlyContinue | $WarningPreference | Continue | $WhatIfPreference | 0 |
|