PowerCLI: Get VM Swap Information

From VI-Toolkit
Revision as of 00:32, 1 July 2013 by Wila (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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/