Random Post: Storage vMotion and RDM
RSS .92| RSS 2.0| ATOM 0.3
  • Home

    PowerCLI Part I

    Microsoft did a great job with PowerShell.  I take it as 1 part BASH, 2 parts PERL, and probably a few dashes of VB (which I know no dashes).

    VMware blended up their own cmdlets for system automation and reporting.  The useage for the most part is straight-forward, but I have found a few oddities.

    For a few months, I was getting all kids of requests for information from the Management.  Off the top of my head, I can think of:

    • VMware-tools versions installed across the board
    • VM counts across clusters
    • Show VM to LUN mappings

    I leaned heavily on posts by LucD, Virtu-Al, and others, so I’ll post some things I came up with.

    Part I

    I always load in the VI Toolkit PSSnapin at the beginning of every PS1, like so:

    # Add in the VI Toolkit goodness
    if ( (Get-PSSnapin -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $null )
    Add-PSsnapin VMware.VimAutomation.Core

    Leave a Reply

    Your email address will not be published. Required fields are marked *