PowerCLI cmdlet XRef – Another look


    Hal Rottenberg

    Any sufficiently advanced PowerShell scripter will eventually write this script, especially those who write books. 😀

    Here’s my version: https://halr9000.com/article/507

    And here’s one that was initially based on mine, but later improved by Joel Bennett, Oisin Grehan, and Jason Archer: https://poshcode.org/2404


      Indeed 😉
      But also someone who starts with a new snapin can profit from a handy XRef of the cmdlets and their parameters. You even mentioned my first attempt at such a parameter XRef in http://halr9000.com/article/482.
      But the main goal of this post was in fact to show the oddities in the current PowerCLI snapin and perhaps trigger a global review of all the oddities.


    Ah, ’tis all good. Ran the script again today and this time there is output.



    Hi, Ran the script and the csv was empty?


      @Rusty, did you get any error messages ?
      Are you using PowerShell v2 ?

    Alan van Wyk

    Thanks Luc- that’s genius – and very handy.


      Thanks Alan, glad you like it.

    Andrey Anastasov

    Luc, thanks for taking the time to investigate and report the oddities. You are correct to assume that they accumulated over multiple releases and can benefit from cleanup.

    In the case of ConfirmImpact, the rules we follow are not straightforward and indeed deserve a dedicated blog post. To use your example as illustration:
    – Set-* cmdlets usually end up as medium priority
    – Set-Snapshot can only modify name and description which have no impact on virtual machines’ end users. This amounts to ‘Low’ impact.
    – With Set-StatInterval, it is possible to irreversibly delete existing statistics by setting a small StorageTimeSecs. This makes for ‘High’ impact.

    Andrey Anastasov
    PowerCLI Dev Team


      Thanks for the feedback Andrey.
      I’m looking forward to that blog post.

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.