Contents tagged with built in commands

  • PowerShell built in variables

    Hello everybody,

    today I want to write few words about PowerShell variables.

    So, let's start from the simplest or with statement what is true and what is false. 

    In PS it's really not philosophical question

    $false

    $true

    The first one stands for false, and the second one for true. It is intended for logical operations in PS.

    Very usefull is Users Home directory:

    $Home

    Current directory:

    $pwd

    Information about users environment:

    $host

    If you ever need to discover which version of power shell, that you execute, you can use 

    $PSVersionTable

    Let's say that you write some kind of loop, and wonder where current item goes in, you have relieve, for this purpose you can use 

    $_ … more