1. Very Simple Powershell

    Basic Powershell

    Variable

    $<name>=<value>

    $usrname='John'
    $len=32
    

    $null -> null value

    $true -> boolean true

    $false -> boolean false

    $_ -> the variable currently being processed

    Data Structure

    Array

    $var[email protected](<element>,<element>,...)
    $var[0]
    $var[100]=2333
    

    Hash Table

    $var[email protected]{<key>=<value>,...}
    $var[<key>]
    $var.key
    

    Process Control

    Branch

    if()
    {
        ...
    }
    elseif()
    {
        ...
    }
    else …
    Tagged as : powershell

Pages