Powershell special branch and loop variable

    $ ^: The first mark in front of a command line

    $$: The last mark before a command line

    $ _: Indicates the iteration variable represents the current cycle.

    $:? Previous command execution status, success (Ture) or failure (False)

    $ Args: specified for the script or function parameters

    $ Error: When an error occurs, the error object stored in the variable $ Error

    $ Foreach: references foreach loop enumerator

    $ Home: the user's home directory

    $ Host: refer to the application host POWERSHELL language

    $ Input: object passed to the script through a pipe enumerator

    $ LastExitCode: on a program or script exit code

    $ Matches: matches the hash table using -match operator found

    $ PSHome: installation location of Windows PowerShell

    $ Profile: standard configuration file (may not exist)

    $ StackTrace: Windows PowerShell captured the previous exception

    $ Switch: switch statement enumerator

 

Reprinted from: https://www.cnblogs.com/dreamer-fish/p/3724217.html

Guess you like

Origin blog.csdn.net/guyan1101/article/details/93739119