🌐
TutorialsPoint
tutorialspoint.com › powershell › powershell_special_variables.htm
Powershell - Special Variables
PowerShell Special variables store information about PowerShell. These are also called automatic variables. Following is the list of automatic variables −
🌐
TecAdmin
tecadmin.net › powershell-special-variables
Special Variables in PowerShell – TecAdmin
April 26, 2025 - PowerShell, like many programming and scripting languages, includes a set of special variables that are reserved for specific purposes. These variables often start with a dollar sign ($) and provide access to various functionalities and information. This article will explore some of the key ...
🌐
Microsoft Learn
learn.microsoft.com › en-us › powershell › module › microsoft.powershell.core › about › about_variables
about_Variables - PowerShell | Microsoft Learn
January 2, 2025 - The backtick is used to escape Unicode characters so they're treated as literals. PowerShell has reserved variables such as $$, $?, $^, and $_ that contain alphanumeric and special characters.
🌐
Microsoft Learn
learn.microsoft.com › en-us › powershell › scripting › lang-spec › chapter-05
Variables - PowerShell | Microsoft Learn
January 8, 2025 - The lifetime of an ordinary variable is that part of program execution during which storage is guaranteed to be reserved for it. This lifetime begins at entry into the scope with which it is associated, and ends no sooner than the end of the execution of that scope.
🌐
Microsoft Learn
learn.microsoft.com › en-us › powershell › module › microsoft.powershell.core › about › about_reserved_words
about_Reserved_Words - PowerShell | Microsoft Learn
September 29, 2025 - Lists the reserved words that cannot be used as identifiers because they have a special meaning in PowerShell.
🌐
Microsoft Learn
learn.microsoft.com › en-us › powershell › module › microsoft.powershell.core › about › about_automatic_variables
about_Automatic_Variables - PowerShell | Microsoft Learn
January 7, 2025 - This behavior changed in PowerShell 7, so that $? always reflects the actual success of the last command run in these expressions. Contains the first token in the last line received by the session. Same as $PSItem. Contains the current object in the pipeline object. You can use this variable in commands that perform an action on every object in a pipeline.
🌐
SS64
ss64.com › ps › syntax-automatic-variables.html
Automatic Variables - PowerShell
Get-Variable - Get a PowerShell variable. Hash Tables Preference Variables - Preferences: Verbosity, Confirmations, ErrorAction, $Debug. Variables - Create & read variables. Copyright © 1999-2026 SS64.com Some rights reserved
🌐
O'Reilly
oreilly.com › library › view › mastering-windows-powershell › 9781787126305 › d4f4906a-47b4-401e-9922-2d894ae347f8.xhtml
Common reserved variables - Mastering Windows PowerShell Scripting - Second Edition [Book]
Common reserved variables Refer to the following table: Errors $Error $Error[0] # The last error Formats the enumeration limit. Dictates the number of elements displayed for objects with properties based … - Selection from Mastering Windows PowerShell Scripting - Second Edition [Book]
🌐
PowerShell Test-Path
powershellfaqs.com › powershell-variable-naming-conventions
PowerShell Variable Naming Conventions [Best Practices and Examples]
September 7, 2024 - # CamelCase for internal variables $serviceName $counterName # PascalCase for global variables $Global:ServiceName $Global:CounterName · PowerShell has a set of reserved words that cannot be used as variable names. These include keywords like if, else, function, and switch.
Find elsewhere
🌐
ITtrainingday
ittrainingday.wordpress.com › 2012 › 12 › 20 › powershell-basics-part-4-variablesreserved-wordsspecial-characters
Powershell basics part 4 – Variables,reserved words,special characters | ITtrainingday
December 23, 2015 - In this post we will continue the training, I will talk more about variables, strings, arrays and other useful powershell things. Powershell has some reserved words.These are: No break elseif if until continue filter in where do foreach return while else function switch We can find out more about reserved words by typing Get-Help about_Reserved_Words.
🌐
SS64
ss64.com › ps › syntax-variables.html
PowerShell Variables and Operators
Get-Item Variable: Clear-Variable - Remove the value from a variable. Get-Variable - Get a PowerShell variable. New-Variable - Create a new variable. Remove-Variable - Remove a variable and its value Set-Variable - Set a variable and a value. Copyright © 1999-2026 SS64.com Some rights reserved
🌐
Xah Lee
xahlee.info › powershell › automatic_variables.html
PowerShell: Automatic Variables
July 30, 2009 - A hash table object containing info about your PowerShell version. Name Value ---- ----- PSVersion 7.1.4 PSEdition Core GitCommitId 7.1.4 OS Microsoft Windows 10.0.19042 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0 ... Represent no value. Its the default value for variable...
🌐
Sconstantinou
sconstantinou.com › stephanos constantinou blog › powershell tutorials › powershell reserved words
PowerShell Reserved Words - Stephanos Constantinou Blog
February 17, 2025 - The second and third commands will give you an error as PowerShell is expecting you to finish if and switch statements. In order to use those words and save them as strings you have to enclose them in quotation marks. By typing the below you are able to save those variables without any issues. ... I hope the tutorial about PowerShell Reserved Words is helpful.
🌐
EDUCBA
educba.com › home › data science › data science tutorials › powershell tutorial › powershell variables
PowerShell Variables | How to Declare and Initialize PowerShell Variables?
March 22, 2023 - You should not use the name of variables that have been pre-defined and try not to assign the string to a strictly int defined variable else it will throw an error.PowerShell has reserved variables such as $$, $?, $^, and $_ that contain ...
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
Wordpress
richardspowershellblog.wordpress.com › 2009 › 05 › 02 › powershell-reserved-words
PowerShell reserved words | Richard Siddaway's Blog
May 2, 2009 - For a list of the language keywords in PowerShell v2 check · Get-Help about_Language_Keywords · You will get a list of the words · Begin Break Catch Continue Data Do Dynamicparam Else Elseif End Exit Filter Finally For Foreach From Function If In Param Process Return Switch Throw Trap Try Until While · And gives a quick description of what each means. Also · Get-Help about_reserved_words · adds the words that cannot be used as identifiers e.g. variable of function names.
🌐
Tech Thoughts
techthoughts.info › tech thoughts › working with powershell variables
Working With PowerShell Variables - Tech Thoughts
September 1, 2019 - In addition to a few constant variables, PowerShell has variables reserved for some environment data.
🌐
Wikiversity
en.wikiversity.org › wiki › PowerShell › Variables
PowerShell/Variables - Wikiversity
October 25, 2023 - Review Microsoft TechNet: Get-Variable and Microsoft TechNet: about_Automatic_Variables. Start a new PowerShell session and use Get-Variable to display a list of all automatic variables and values that are defined by default when a new session is started.
🌐
Reddit
reddit.com › r/powershell › powershell reserved words
r/PowerShell on Reddit: PowerShell Reserved Words
June 20, 2018 - If you try to use any of the words about, PowerShell · there was a recent post in this subreddit where the reserved variable named "$Input" was triggering problems you may want to mention that as another possible source of glitches. your for future use section words are NOT styled the same way as the previous list you may want to make them the same style.