
PowerCLI Cookbook
By :

Wouldn't it be great if a list could tell you how large your snapshots are growing? Wouldn't it help if you are running low on disk space to know which snapshot is the largest in your environment? By default, the consumed amount of disk space is not a property that gets returned to the list of output for Get-Snapshot
. However, you can easily add properties to the View of the data being returned. This is a native PowerShell function intended to build on the default views and return any property contained in the objects returned by a cmdlet. Although you will examine it when used with snapshots, the same technique works for any PowerShell object.
To begin this recipe, you will need a PowerCLI window and an active connection to vCenter. You will also need one or more virtual machines with snapshots present.
In order to manipulate the list of snapshots to get better information about them, perform the following...
Change the font size
Change margin width
Change background colour