PowerShell首选项变量

首选项变量是用于自定义Windows PowerShell行为的那些变量。 任何用户都可以更改这些变量的值。 这些变量影响PowerShell操作环境以及在该环境中运行的所有命令。

下表列出了首选项变量及其默认值:

变量名称 默认值
$ConfirmPreference High
$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 None(空哈希表)
$PSEmailServer None
$PSModuleAutoLoadingPreference All
$PSSessionApplicationName WSMAN
$PSSessionConfigurationName http://schemas.microsoft.com/PowerShell/microsoft.PowerShell
$PSSessionOption 一个哈希对象
$VerbosePreference SilentlyContinue
$WarningPreference Continue
$WhatIfPreference 0

上一篇:PowerShell自动变量

下一篇:PowerShell数组

关注微信小程序
程序员编程王-随时随地学编程

扫描二维码
程序员编程王

扫一扫关注最新编程教程