PowerShell

Powershell: Quick & Dirty

Just poking around with PowerShell. Here are some useful tips and tricks I have found to customize it:

    Change prompt to bash-style

    function prompt { [string]$(get-location) + " % " }
    Helpful Debugging Tricks

    PS> Set-PSDebug -trace [level] [-step]

    There are three possible trace levels:
    • 0: No tracing
    • 1: Trace script lines as they execute
    • 2: Also trace variable assignments, function calls, and scripts.

    Adding -step means that the script also pauses after each line.

Syndicate content