about_preference_variables.help - TOPIC Preference...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 TOPIC Preference Variables SHORT DESCRIPTION Variables that customize the behavior of Windows PowerShell LONG DESCRIPTION Windows PowerShell includes a set of variables that enable you to customize its behavior. These "preference variables" work like the options in GUI-based systems. The preference variables affect the Windows PowerShell operating environment and all commands run in the environment. In many cases, the cmdlets have parameters that you can use to override the preference behavior for a specific command. The following table lists the preference variables and their default values. Variable Default Value -------- ------------- $ConfirmPreference High $DebugPreference SilentlyContinue $ErrorActionPreference Continue $ErrorView NormalView $FormatEnumerationLimit 4 $LogCommandHealthEvent False (not logged) $LogCommandLifecycleEvent False (not logged) $LogEngineHealthEvent True (logged) $LogEngineLifecycleEvent True (logged) $LogProviderLifecycleEvent True (logged) $LogProviderHealthEvent True (logged) $MaximumAliasCount 4096 $MaximumDriveCount 4096 $MaximumErrorCount 256 $MaximumFunctionCount 4096 $MaximumHistoryCount 64 $MaximumVariableCount 4096 $OFS (Space character (" ")) $OutputEncoding ASCIIEncoding object $ProgressPreference Continue $PSEmailServer (None) $PSSessionApplicationName WSMAN $PSSessionConfigurationName http://schemas.microsoft.com/powershell/microsoft.powershell $PSSessionOption (See below) $VerbosePreference SilentlyContinue $WarningPreference Continue $WhatIfPreference 0 Windows Powershell also includes the following environment variables that
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 store user preferences. For more information about the environment variables, see about_environment_variables. Variable -------- PSModulePath WORKING WITH PREFERENCE VARIABLES This document describes each of the preference variables. To display the current value of a specific preference variable, type the name of the variable. In response, Windows PowerShell provides the value. For example, the following command displays the value of the $ConfirmPreference variable. PS> $ConfirmPreference High To change the value of a variable, use an assignment statement. For example, the following statement assigns the value "Medium" to the $ConfirmPreference variable. PS> $ConfirmPreference = "Medium" Like all variables, the values that you set are specific to the current Windows PowerShell window. To make them effective in all Windows PowerShell windows, add them to your Windows PowerShell profile. For more information, see about_profiles. WORKING REMOTELY When you run commands on a remote computer, the remote commands are subject only to the preferences set in the Windows PowerShell client on the remote computer. For example, when you run a remote command, the value of the $DebugPreference variable on remote computer determines how Windows PowerShell responds to debugging messages. For more information about remote commands, see about_remote.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/03/2010 for the course BUS fin taught by Professor Fez during the Spring '10 term at Valparaiso.

Page1 / 24

about_preference_variables.help - TOPIC Preference...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online