spot_img

Preference Variables

The preference variables are those variables which customize the behavior of the Windows PowerShell. Any user can change the value of these variables. These variables affect the PowerShell operating environment and also all the commands which run in the environment.

The Following table lists the preference variables and their default values:

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

Next TopicPowerShell Array

spot_img
Previous articleSSRS vs Power BI
Next articleExcel VBA Find