Built-in variables for PowerShell

Source: Internet
Author: User

LS Variable:

Name Value Description
$
? TRUE Status of last Command
^
Args System.object[]
Confirmpreference High Dictates when confirmation should is requested. Confirmation is requested when the confirmimpact of the operation are equal to or greater than $ConfirmPreference. If $ConfirmPreference is None, the actions are only being confirmed when the Confirm is specified.
Consolefilename Name of the current console file
Debugpreference Silentlycontinue Dictates the action taken when a DEBUG message is delivered
Error System.Collections.ArrayList
Erroractionpreference Continue Dictates the action taken when a error message is delivered
Errorview Normalview Dictates the view mode to use when displaying errors
ExecutionContext System.Management.Automation.EngineIntrinsics The run objects available to cmdlets
FALSE FALSE Boolean False
Formatenumerationlimit 4 Dictates the limit of enumeration on formatting IEnumerable objects
HOME C:\Users\814072 Folder containing the current user's profile
Host System.Management.Automation.Internal.Host.InternalHost A reference to the host of the current Runspace
Input System.collections.arraylist+arraylistenumeratorsimple
Maximumaliascount 4096 Maximum number of aliases allowed in a session
Maximumdrivecount 4096 Maximum number of drives allowed in a session
Maximumerrorcount 256 Maximum number of errors to retain in a session
Maximumfunctioncount 4096 Maximum number of functions allowed in a session
Maximumhistorycount 4096 Maximum Number of History objects to retain in a session
Maximumvariablecount 4096 Maximum number of variables allowed in a session
Myinvocation System.Management.Automation.InvocationInfo
Nestedpromptlevel 0 Dictates what type of prompt should is displayed for the current nesting level
Null References to the null variable always return the null value. Assignments has no effect.
Outputencoding System.Text.DBCSCodePageEncoding The text encoding used when piping text to a native executable file
Pid 4800 Current Process ID
Profile C:\Users\814072\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1
Progresspreference Continue Dictates the action taken when Progress Records is delivered
Psboundparameters System.Management.Automation.PSBoundParametersDictionary
Pscommandpath
Psculture Zh-cn Culture of the current Windows PowerShell session
Psdefaultparametervalues System.Management.Automation.DefaultParameterDictionary Variable to hold all default <cmdlet:parameter, value> pairs
Psemailserver Variable to contain the name of the email server. This can is used instead of the HostName parameter in the Send-mailmessage cmdlet.
Pshome C:\Windows\System32\WindowsPowerShell\v1.0 Parent folder of the host application of the current Runspace
Psise Microsoft.PowerShell.Host.ISE.ObjectModelRoot
Psscriptroot
Pssessionapplicationname Wsman AppName where the remote connection would be established
Pssessionconfigurationname Http://schemas.microsoft.com/powershell/Microsoft.PowerShell Name of the session configuration which'll be loaded on the remote computer
Pssessionoption System.Management.Automation.Remoting.PSSessionOption Default session options for new remote sessions
Psuiculture En-US UI culture of the current Windows PowerShell session
Psunsupportedconsoleapplications Microsoft.PowerShell.Host.ISE.UICollection ' 1[system.string]
Psversiontable System.Management.Automation.PSVersionHashTable Version information for current Windows PowerShell session
Pwd C:\Users\814072
Scriptanalyzer Microsoft.PowerShell.Host.ISE.ISEAddOnTool
Scriptbrowser Microsoft.PowerShell.Host.ISE.ISEAddOnTool
ShellId Microsoft.PowerShell The ShellID identifies the current shell. This was used by #Requires.
StackTrace At System.io.__error.winioerror (Int32 errorCode, String Maybefullpath)

At System.IO.FileStream.Init (String path, FileMode mode, FileAccess access, Int32 rights, Boolean Userights, FileShare sha Re, Int32 buffersize, fileoptions options, Security_attributes secattrs, String Msgpath, Boolean bfromproxy, Boolean Uselo Ngpath, Boolean Checkhost)

At System.IO.FileStream. ctor (string path, FileMode mode, FileAccess access, FileShare share, Int32 buffersize, fileoptions options, String Msgpath , Boolean Bfromproxy)

At System.IO.FileStream. ctor (String path, FileMode mode, FileAccess access, FileShare share)

At System.Management.Automation.PathUtils.MasterStreamOpen (Pscmdlet cmdlet, String FilePath, Encoding Resolvedencoding, Boolean defaultencoding, Boolean Append, Boolean Force, Boolean noclobber, filestream& FileStream, streamwriter& StreamWriter, fileinfo& readonlyfileinfo, Boolean Isliteralpath)
TRUE TRUE Boolean True
Verbosepreference Silentlycontinue Dictates the action taken when a Verbose message is delivered
Warningpreference Continue Dictates the action taken when a Warning message is delivered
Whatifpreference FALSE If true, WhatIf is considered to being enabled for all commands.

Built-in variables for PowerShell

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.