{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

about_preference_variables.help

about_preference_variables.help - TOPIC Preference...

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

View Full Document Right Arrow Icon
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 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.
Image of page 1

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

View Full Document Right Arrow Icon
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.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern