PowerCLI: Get VM Swap Information
Get VM Swap information
author: Matt Andes
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.
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