Difference between revisions of "Power Shell"

Jump to navigation Jump to search
541 bytes added ,  14:12, 4 October 2010
→‎Variables: Added "Macros / Built-in Variables"
(→‎Useful One-Liners: Added "Current working directory")
(→‎Variables: Added "Macros / Built-in Variables")
Line 231: Line 231:
dir env:                          # Show all available variables
dir env:                          # Show all available variables
</source>
</source>
=== Macros / Built-in Variables ===
{|cellpadding="4" cellspacing="0" border="1"
|- style="background-color:#bbddff;"
! Variable                !! Description
|-
| <code> $_ </code>      || Either
|-
| <code> $? </code>      || Success/failure of previous statement
|-
| <code> $Error </code>  || Last error
|-
| <code> $LastExitCode </code> || Exit code of the last natively run application
|-
| <code> $foreach </code> || Enumerator in a foreach loop
|-
| <code> $Host </code>    || Information about the machine being executed on
|}


== Conditional Operators ==
== Conditional Operators ==

Navigation menu