Skip to content

Latest commit

 

History

History
68 lines (56 loc) · 1.58 KB

README.md

File metadata and controls

68 lines (56 loc) · 1.58 KB

goatops-ps-cli

Powershell script picking wisdoms from GoatOps

https://github.com/binford2k/goatops

Usage

Run as script

PS> .\goatops.ps1 -Run
    -------------------------------------------------------------------
    <[ Goats don't have a particular preference between Java and C#. ]>
    -------------------------------------------------------------------
            \
             \
              )__(
             '|oo|'________/
              |__|         |
               V ||"""""""||
                 ||       ||

Dot source it and use it as a function

# Example backup script
try {
    ....
} catch {
    . C:\scripts\goatops.ps1
    $goatWisdom = Get-GoatWisdom;
    Write-Output "Backups failed...`n${goatWisdom}";
};
PS> .\backup.ps1
Backups failed...
    -----------------------------------------------------------------------------------------                      
    <[ Nobody can go through your goat and get you in trouble for what they find in there. ]>
    -----------------------------------------------------------------------------------------
            \
             \
              )__(
             '|oo|'________/
              |__|         |
               V ||"""""""||
                 ||       ||

In case of an issue with the wisdom retieval, it will just give you a "Meh!"

    ----------
    <[ Meh! ]>
    ----------
            \
             \
              )__(
             '|oo|'________/
              |__|         |
               V ||"""""""||
                 ||       ||