31 July 2019

Even More Efficient PowerShelling with PowerCLI Argument Completers!

Updated vNugglets PowerShell Module! Ya-hoo -- tab-completion for several parameters' values and for many VMware PowerCLI cmdlets! We all are accustomed to being super fast on the command line by leveraging tab-completion of, well, most things: paths, cmdlet names, process names, service names, etc.. We also doit in things like editors that have IntelliSense. But, while we may also want to have that same experience with inventory objects in our virtual infrastructures, we do not yet have such capabilities.

So, we here at vN took the time to hammer out some goodness for enabling tab-completion of parameter values on VMware PowerCLI cmdlets -- now we can tab-complete values of actual inventory objects in a snap!

* Update 23 Aug 2019:
We added a Getting Started section in the Docs in the GitHub repo. See https://github.com/vNugglets/PowerShellArgumentCompleters/tree/master/docs for such information, to get going straight away!
* end of 23 Aug 2019 update
What:
  • This comes in the form of an argument completer add script, soon to be in PowerShellGallery, and with code already at https://github.com/vNugglets/PowerShellArgumentCompleters
  • Initially, for the VMware.PowerCLI module, this adds 301 tab-completion capabilities across 240+ cmdlets and a dozen different parameters
How:
  • You register the argument completers in a PowerShell session by first importing any/all VMware PS modules you'll be using, and then running the Register-VMwarePowerCLIArgumentCompleter script from said repo above (again, this will eventaully be available in the PowerShell gallery for easier consumption/updates)
Example:
  • The following would result in the user being able to tab through all of the completions for the given parameter after which they pressed the Tab key
    • Get-VM -Name matt<tab>
    • Get-VMHost myho<tab>
    • Get-Datastore -VM myvm0<tab>
    • Get-VDSwitch -VMHost <tab>
Further Reading:
  • For more detail/background as this pertains to the VMware.PowerCLI module, see the corresponding Support Natural PowerShell Interactive Behavior: tab completion idea at powercli.ideas.aha.io
  • To be clear (and to acknowledge others before): others have written about such things on small scale (adding tab-completion for the -Name parameter for something like Get-VM, for example), but this current goodness is an effort to add far more tab-completions to some of our favorite modules
  • and, for when you want to Get-ArgumentCompleter, Chris Dent made the excellent (and deep) Get-ArgumentCompleter.ps1 script with which we can see the registered argument completers in our PowerShell session. See his GitHub gist at https://gist.github.com/indented-automation/26c637fb530c4b168e62c72582534f5b
Time to get tabbin'!  And, for when you have stellar ideas for more completers, either let us know, or collaborate with us on GitHub -- we'll make great things together!

15 July 2018

Updated vNugglets.VDNetworking PowerShell module

Updated vNugglets PowerShell Module!Hurray -- the vNugglets.VDNetworking PowerShell module is now updated (with updates available on the PowerShellGallery)! This module has cmdlets for helping manage your VMware virtual distributed networking infrastructure, like reporting on and configuring traffic filtering/marking configurations. The ChangeLog has all of the juicy details, but the big news with this update:

The Set-VNVMHostNetworkAdapterVDUplink cmdlet provides the ability to manage the VDSwitch Uplink for a VMHost physical NIC ("VMNIC") on the VDSwitch of which the VMNIC is already a part -- finally! (this is not yet available in a native cmdlet in PowerCLI, but I'm sure that VMware has it on their list).

The copious examples show all kinds of ways to use this module.  Grab the module from the PowerShellGallery with the standard
Find-Module vNugglets.VDNetworking | Install-Module
that we all know and love (or, use Update-Module instead of Install-Module to update a previously installed version to current, of course).

Enjoy!

Updated DRSRule PowerShell module, now on PSGallery!

A quick blurb on the DRSRule PowerShell module for managing VMware DRS rules via PowerShell/PowerCLI: the module is updated with several bugfixes and enhancements.

Possibly as exciting of news: the module is now available on the official PowerShellGallery, so it is a snap to install/update the module on your machine!

As with any module on the PowerShellGallery, you save the module with the Save-Module cmdlet (so that you can inspect the code and ensure that things are good -- security first!).  And, you install the module with the Install-Module cmdlet.

The straightforward and memorable instructions for saving- and/or installation of a module are available by default on each module's Gallery page. For this module, see https://www.powershellgallery.com/packages/DRSRule.

Enjoy!

18 June 2017

Updated vNugglets.Utility PowerShell module: v1.2!

Updated vNugglets PowerShell Module!Quick post about some great news -- we have updated the vNugglets.Utility PowerShell module, improving speed, flexibility, and usability of some functions! Additionally, the module is now available in the PowerShell Gallery -- hurray!

As for the easier means by which to get the module:  now you can grab the vNugglets.Utility module in the same way that you get everything else from the PowerShell Gallery.  You save the module with the Save-Module cmdlet (so that you can inspect the code and ensure that things are good -- security first!).  And, you install the module with the, you guessed it, the Install-Module cmdlet. Also, you can see the straightforward instructions for this saving- and installation of the module at https://www.powershellgallery.com/packages/vNugglets.Utility.

And, the details about the updates in the latest version are chronicled in the ChangeLog (which is in the module's repo at the vNugglets GitHub project vNuggletsPSMod).  Enjoy the new goodness, and, as always, let us know how it can be better (or, collaborate with us on GitHub)!

05 December 2016

vNugglets PowerShell module release!

vNugglets PowerShell Module!While we have amassed a healthy stack of useful, VMware vSphere-related functions and code snippets here at vNugglets, the code management/interaction can certainly become tedious in more than one way:  consumption of the snippets is not the most straight forward, finding snippets/functions is a bit tedious, maintenance and updates to code does not necessarily show when the code is in some older post.

So, why not make what the people want:  a vNugglets PowerShell module?  Why not indeed.  So, we did.  This initial module release not only focused on function-ifying snippets, standardizing parameters, fleshing out comment-based help (many of the hallmarks of a legitimate PowerShell module), but also set about improving on several of the vNugglets snippets/functions from across the years -- hurray!  It also captured ideas on several improvements to make in the near future.

For now the module will live at the vNugglets GitHub project vNuggletsPSMod.  It has all kinds of informative supporting docs, like the ReadMe (with a QuickStart section) and the ChangeLog, that will fill you in on all of the nitty-gritty details.

Examples

We also made a vNugglets.Utility Example page so that you can see straight away what are some of the exciting capabilities of this module.

As for getting the module itself, check out the vNuggletsPSMod Releases page, which has the .zip file of just the PowerShell module (see the QuickStart mentioned above for getting started with the module).  The future fate of the module may be that it is housed in the PowerShell Gallery, but we have not invested the time to work on that just yet.

So check out the docs, grab the module, and let the good times roll with a newly born module that will surely be near and dear to all of our hearts.  And, now that we have the project on GitHub, please feel free to help us out in making it even mo better!

16 November 2016

Updated PowerShell Module for Sortable HTML Reporting -- NewHtmlReport v1.2

NewHtmlReport Snippet
Great news -- we've updated the NewHtmlReport PowerShell module -- v1.2!  Refresher: this is a module to "easily create functional, somewhat styled HTML reports from data, providing additional functionality to what the base ConvertTo-Html cmdlet provides".

The NewHtmlReport GitHub repo has the whole project, and the Releases page has the link to the .zip file with just the PowerShell module code itself.

The module is now a bit more modern, as we have added things like:
  • support for accepting objects from pipeline in the New-HtmlReport function
  • cmdlet-based module configuration
  • JSON-based module configuration storage
  • CDN-based resource usage for the jQuery and TableSorter JS libraries by default, for ease of "getting up and going" right out of the box
The are some examples of the output up at the GitHub Pages page for this repository at http://mtboren.github.io/NewHtmlReport/.

Also, the ReadMe has good info about the module, including the Quick Start steps, and the ChangeLog has more detail on what things changed and how.

Enjoy!

12 January 2016

XtremIO PowerShell Module Updated -- v0.9.5 available

XtremIO + PowerShell!Even more updates and improvements!  Version 0.9.5 of the XtremIO.Utils PowerShell module is now available at https://github.com/mtboren/XtremIO.Utils/releases (starting with the 0.8.x line, this module has been on GitHub). There are a vast number of update, improvements, bugfixes, and even some new features in this release.  From supporting several improvements that came in v2 of the XtremIO REST API (which help with cmdlet speed) to further standardization in the object model (property-availability across types) to now having the somewhat overdue New-XIOSnapshot cmdlet (supporting new snapshots in the XIOS v2 API). See the changelog for the exciting details.

Oh, and, while the cmdlets all have built-in help with examples (like every cmdlet should), there is now a GitHub Pages page with a whole slew of examples with output. See https://mtboren.github.io/XtremIO.Utils/ for a load of such examples.  The readme has a link to that page, but sometimes people don't read the readme.  Yes, really.

While you've probably already gone to the changelog to see all of the gorey details, one other tidbit about this version:  the amount of change in this release probably warranted incrementing the "minor" version number of the module, but "0.10.0" seems odd, and it's not time for v1.0 yet.  So, v0.9.5 it is. Enjoy!