PowerCLI: Get VM Swap Information: Difference between revisions

From VI-Toolkit
Jump to navigation Jump to search
(Created page with "=== 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 live...")
 
mNo edit summary
 
Line 13: Line 13:
   
   
  Get-VM | Get-VMSwapInfo
  Get-VM | Get-VMSwapInfo
 
  $vm = Get-VM  
  $vm = Get-VM  
  Get-VMSwapInfo $vm
  Get-VMSwapInfo $vm

Latest revision as of 01:32, 1 July 2013

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/