PowerCLI: Get VM Swap Information

From VI-Toolkit
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Get VM Swap information

author: Matt Andes

Description

Retrieves the swap information for a VM, includeing VM name, name of swap file, the datastore it lives on and the amount of free space on that datastore.

Usage

This command can be called a couple of different ways. It can take piped input from the Get-VM cmdlet or you can give it the name of a VM and that will work as well.

Get-VMSwapInfo -VM "VMName"
 
Get-VMSwapInfo "VMName"

Get-VM | Get-VMSwapInfo

$vm = Get-VM 
Get-VMSwapInfo $vm


Location

http://www.virtual-matt.net/2013/06/get-vm-swap-information/