VMware find RDM Disks

This script identifies and exports RDM disks within the vCenter environment. Please remember to input the $vcenter variable and ensure the export path is valid.

########################################
## Export RDM from vCenter ##
## Created By: Ben Prudence ##
## Created: 19/10/2015 ##
########################################

## Variables
$vcenter = xxxxvcenter01

## Add VMware Snapin
add-pssnapin VMware.VimAutomation.Core

## Connect to vCenter
Connect-VIServer $vcenter

## Get RDMs and Export
Get-VM | Get-HardDisk | Where {$_.DiskType -like 'Raw*'} | `
Select Parent, Name, FileName, ScsiCanonicalName, CapacityGB, DiskType | `
Export-Csv c:\Scripts\Raw.csv -NoTypeInformation

 

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.