Manipulating the list of snapshots to get better information

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.

Getting Started

To begin this recipe, you ...

Get PowerCLI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.