<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>VMware Communities: Message List - list disks rdm with powershell</title>
    <link>http://communities.vmware.com/community/vmtn/vsphere/automationtools/windows_toolkit?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Sat, 31 Oct 2009 20:08:24 GMT</pubDate>
    <generator>Clearspace 1.10.12 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2009-10-31T20:08:24Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1405209?tstart=0#1405209</link>
      <description>&lt;br /&gt;
This script is very helpful.  I have trying to figure out how to add 'Runtime Name:' and 'Adpater:' information to this report.&lt;br /&gt;
&lt;p /&gt;
 Any thoughts on how to do this?&lt;br /&gt;
&lt;p /&gt;
Thanks in advance.&lt;br /&gt;
&lt;p /&gt;
-Mark&lt;br /&gt;
&lt;p /&gt;
fc.200000e08b9bad3f:210000e08b9bad3f-fc.50060160c1e02ae9:5006016141e02ae9-naa.60060160efe01900c883b8dee114de11&lt;br /&gt;
   Runtime Name: vmhba1:C0:T0:L22&lt;br /&gt;
   Device: naa.60060160efe01900c883b8dee114de11&lt;br /&gt;
   Device Display Name: DGC Fibre Channel Disk (naa.60060160efe01900c883b8dee114de11)&lt;br /&gt;
   Adapter: vmhba1 Channel: 0 Target: 0 LUN: 22&lt;br /&gt;
   Adapter Identifier: fc.200000e08b9bad3f:210000e08b9bad3f&lt;br /&gt;
   Target Identifier: fc.50060160c1e02ae9:5006016141e02ae9&lt;br /&gt;
   Plugin: NMP&lt;br /&gt;
   State: active&lt;br /&gt;
   Transport: fc&lt;br /&gt;
   Adapter Transport Details: WWNN: 20:00:00:e0:8b:9b:ad:3f WWPN: 21:00:00:e0:8b:9b:ad:3f&lt;br /&gt;
   Target Transport Details: WWNN: 50:06:01:60:c1:e0:2a:e9 WWPN: 50:06:01:61:41:e0:2a:e9</description>
      <pubDate>Sat, 31 Oct 2009 20:08:24 GMT</pubDate>
      <author>zMarkz</author>
      <guid>http://communities.vmware.com/message/1405209?tstart=0#1405209</guid>
      <dc:date>2009-10-31T20:08:24Z</dc:date>
      <clearspace:dateToText>3 weeks, 1 day ago</clearspace:dateToText>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1399226?tstart=0#1399226</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
nobody have an idea ?&lt;br /&gt;
&lt;br /&gt;
Thanks.</description>
      <pubDate>Mon, 26 Oct 2009 21:29:09 GMT</pubDate>
      <author>jsenon</author>
      <guid>http://communities.vmware.com/message/1399226?tstart=0#1399226</guid>
      <dc:date>2009-10-26T21:29:09Z</dc:date>
      <clearspace:dateToText>3 weeks, 6 days ago</clearspace:dateToText>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1397026?tstart=0#1397026</link>
      <description>&lt;br /&gt;
Thanks LucD.&lt;br /&gt;
&lt;p /&gt;
Is it possible to add Runtime Name and Lun Name  in the display of your script ?&lt;br /&gt;
&lt;p /&gt;
 (This data is available in VCenter 4, on manage Path of the RDM Disk)&lt;br /&gt;
&lt;p /&gt;
Thanks in advance,&lt;br /&gt;
&lt;p /&gt;
Regads,</description>
      <pubDate>Fri, 23 Oct 2009 14:20:50 GMT</pubDate>
      <author>jsenon</author>
      <guid>http://communities.vmware.com/message/1397026?tstart=0#1397026</guid>
      <dc:date>2009-10-23T14:20:50Z</dc:date>
      <clearspace:dateToText>1 month, 8 hours ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1369809?tstart=0#1369809</link>
      <description>I suspect you are after the DisplayName as it's called in the SDK Reference.&lt;br /&gt;
Try this script, the DisplayName has been added.&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;$report = @()
$vms = Get-VM | Get-View
foreach($vm in $vms){
	foreach($dev in $vm.Config.Hardware.Device){
		if(($dev.gettype()).Name -eq &amp;quot;VirtualDisk&amp;quot;){
			if(($dev.Backing.CompatibilityMode -eq &amp;quot;physicalMode&amp;quot;) -or 
			($dev.Backing.CompatibilityMode -eq &amp;quot;virtualMode&amp;quot;)){
				$row = &amp;quot;&amp;quot; | select VMName, VMHost, HDDeviceName, HDFileName, HDMode, HDsize, HDDisplayName
				$row.VMName = $vm.Name
				$esx = Get-View $vm.Runtime.Host
				$row.VMHost = ($esx).Name
				$row.HDDeviceName = $dev.Backing.DeviceName
				$row.HDFileName = $dev.Backing.FileName
				$row.HDMode = $dev.Backing.CompatibilityMode
				$row.HDSize = $dev.CapacityInKB
				$row.HDDisplayName = ($esx.Config.StorageDevice.ScsiLun | where {$_.Uuid -eq $dev.Backing.LunUuid}).DisplayName
				$report += $row
			}
		}
	}
}
$report
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Mon, 21 Sep 2009 20:51:52 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1369809?tstart=0#1369809</guid>
      <dc:date>2009-09-21T20:51:52Z</dc:date>
      <clearspace:dateToText>2 months, 2 days ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1369305?tstart=0#1369305</link>
      <description>&lt;br /&gt;
Does anyone know how to add the device name to the output?  For example, instead of just the vmhba notitation, can you also get something like this:  &lt;br /&gt;
&lt;p /&gt;
EMC Fibre Channel Disk (naa.60060480000190100744533031393736)&lt;br /&gt;
&lt;p /&gt;
Thanks!&lt;br /&gt;
&lt;p /&gt;
Tom Cronin, VCP, VMware vExpert 2009 - Co-Leader Buffalo, NY VMUG</description>
      <pubDate>Mon, 21 Sep 2009 14:21:53 GMT</pubDate>
      <author>TCronin</author>
      <guid>http://communities.vmware.com/message/1369305?tstart=0#1369305</guid>
      <dc:date>2009-09-21T14:21:53Z</dc:date>
      <clearspace:dateToText>2 months, 2 days ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1288994?tstart=0#1288994</link>
      <description>&lt;p /&gt;
thanks man, this is such a useful script !&lt;br /&gt;
&lt;p /&gt;
Kind Regards,&lt;br /&gt;
AWT</description>
      <pubDate>Fri, 19 Jun 2009 03:00:08 GMT</pubDate>
      <author>AlbertWT</author>
      <guid>http://communities.vmware.com/message/1288994?tstart=0#1288994</guid>
      <dc:date>2009-06-19T03:00:08Z</dc:date>
      <clearspace:dateToText>5 months, 6 days ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1232634?tstart=0#1232634</link>
      <description>&lt;br /&gt;
Thanks LucD&lt;br /&gt;
&lt;p /&gt;
 Thats great! And a useful link so hopefully i can work more out for myself!&lt;br /&gt;
&lt;p /&gt;
 E</description>
      <pubDate>Wed, 22 Apr 2009 14:15:04 GMT</pubDate>
      <author>emmar</author>
      <guid>http://communities.vmware.com/message/1232634?tstart=0#1232634</guid>
      <dc:date>2009-04-22T14:15:04Z</dc:date>
      <clearspace:dateToText>7 months, 4 days ago</clearspace:dateToText>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1232579?tstart=0#1232579</link>
      <description>Yes, the &lt;a class="jive-link-external" href="http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.VirtualMachine.html"&gt;VirtualMachine&lt;/a&gt; object contains, under the &lt;b&gt;Runtime.Host&lt;/b&gt; property, a MoRef to the host on which the VM is running or assigned.&lt;br /&gt;
The script could then be something like this:&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;$report = @()
$vms = Get-VM  | Get-View
foreach($vm in $vms){
  foreach($dev in $vm.Config.Hardware.Device){
    if(($dev.gettype()).Name -eq &amp;quot;VirtualDisk&amp;quot;){
	  if(($dev.Backing.CompatibilityMode -eq &amp;quot;physicalMode&amp;quot;) -or 
	     ($dev.Backing.CompatibilityMode -eq &amp;quot;virtualMode&amp;quot;)){
	    $row = &amp;quot;&amp;quot; | select VMName, VMHost, HDDeviceName, HDFileName, HDMode, HDsize
          $row.VMName = $vm.Name
	    $row.VMHost = (Get-View $vm.Runtime.Host).Name
	    $row.HDDeviceName = $dev.Backing.DeviceName
	    $row.HDFileName = $dev.Backing.FileName
	    $row.HDMode = $dev.Backing.CompatibilityMode
           $row.HDSize = $dev.CapacityInKB
	    $report += $row
	  }
	}
  }
}
$report
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Wed, 22 Apr 2009 13:20:07 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1232579?tstart=0#1232579</guid>
      <dc:date>2009-04-22T13:20:07Z</dc:date>
      <clearspace:dateToText>7 months, 4 days ago</clearspace:dateToText>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1232556?tstart=0#1232556</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
This script is great is there a way to get it to output what ESX host the VMs are on?? Is there a property for the host within the $vm object??? something like $vm.Host??&lt;br /&gt;
&lt;p /&gt;
 Thanks&lt;br /&gt;
&lt;p /&gt;
Emma</description>
      <pubDate>Wed, 22 Apr 2009 13:04:53 GMT</pubDate>
      <author>emmar</author>
      <guid>http://communities.vmware.com/message/1232556?tstart=0#1232556</guid>
      <dc:date>2009-04-22T13:04:53Z</dc:date>
      <clearspace:dateToText>7 months, 4 days ago</clearspace:dateToText>
      <clearspace:replyCount>8</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1136838?tstart=0#1136838</link>
      <description>The answer is in  &lt;a href="http://communities.vmware.com/message/1136794#1136794" class="jive-link-message"&gt;Get RDM size&lt;/a&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:04:59 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1136838?tstart=0#1136838</guid>
      <dc:date>2009-01-06T10:04:59Z</dc:date>
      <clearspace:dateToText>10 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>9</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1136833?tstart=0#1136833</link>
      <description>&lt;br /&gt;
Hi all ....&lt;br /&gt;
&lt;p /&gt;
 I was wondering how to add the RDM size to this table ??&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Kind regards&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Tue, 06 Jan 2009 09:46:42 GMT</pubDate>
      <author>gboskin</author>
      <guid>http://communities.vmware.com/message/1136833?tstart=0#1136833</guid>
      <dc:date>2009-01-06T09:46:42Z</dc:date>
      <clearspace:dateToText>10 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>10</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1122716?tstart=0#1122716</link>
      <description>This script is great. Just as an FYI, instead of looking for disks that are virtual or physical mode, I looked for disks that were not equal to flat.</description>
      <pubDate>Fri, 12 Dec 2008 15:43:41 GMT</pubDate>
      <author>brekus</author>
      <guid>http://communities.vmware.com/message/1122716?tstart=0#1122716</guid>
      <dc:date>2008-12-12T15:43:41Z</dc:date>
      <clearspace:dateToText>11 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>11</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1064192?tstart=0#1064192</link>
      <description>Just came to realise that RDMs come in 2 flavours, physical and virtual.&lt;br /&gt;
Since I only tested for physical and your RDMs are probably in virtual compatibility mode they didn't show.&lt;br /&gt;
&lt;br /&gt;
This script should only show RDMs but for both compatibility modes&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;$report = @()
$vms = Get-VM | Get-View
foreach($vm in $vms){
  foreach($dev in $vm.Config.Hardware.Device){
    if(($dev.gettype()).Name -eq &amp;quot;VirtualDisk&amp;quot;){
	  if(($dev.Backing.CompatibilityMode -eq &amp;quot;physicalMode&amp;quot;) -or 
	     ($dev.Backing.CompatibilityMode -eq &amp;quot;virtualMode&amp;quot;)){
	    $row = &amp;quot;&amp;quot; | select VMName, HDDeviceName, HDFileName, HDMode
          $row.VMName = $vm.Name
	    $row.HDDeviceName = $dev.Backing.DeviceName
	    $row.HDFileName = $dev.Backing.FileName
	    $row.HDMode = $dev.Backing.CompatibilityMode
	    $report += $row
	  }
	}
  }
}
$report
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Wed, 01 Oct 2008 11:23:06 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1064192?tstart=0#1064192</guid>
      <dc:date>2008-10-01T11:23:06Z</dc:date>
      <clearspace:dateToText>1 year, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>12</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1064004?tstart=0#1064004</link>
      <description>&lt;br /&gt;
Thanks mate, is working now:&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
$report = @() &lt;br /&gt;
&lt;p /&gt;
$vms = Get-VM | Get-View &lt;br /&gt;
&lt;p /&gt;
foreach($vm in $vms) {&lt;br /&gt;
&lt;p /&gt;
foreach($dev in $vm.Config.Hardware.Device) {&lt;br /&gt;
&lt;p /&gt;
if(($dev.gettype()).Name -eq "VirtualDisk") { &lt;br /&gt;
&lt;p /&gt;
$row = "" | &lt;b&gt;select&lt;/b&gt; VMName, HDDeviceName, HDFileName &lt;br /&gt;
&lt;p /&gt;
$row.VMName = $vm.Name &lt;br /&gt;
&lt;p /&gt;
$row.HDDeviceName = $dev.Backing.DeviceName &lt;br /&gt;
&lt;p /&gt;
$row.HDFileName = $dev.Backing.FileName &lt;br /&gt;
&lt;p /&gt;
$report += $row &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
} &lt;br /&gt;
&lt;p /&gt;
} &lt;br /&gt;
&lt;p /&gt;
} &lt;br /&gt;
&lt;p /&gt;
$report&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Wed, 01 Oct 2008 06:27:27 GMT</pubDate>
      <author>munizaba@gmail.com</author>
      <guid>http://communities.vmware.com/message/1064004?tstart=0#1064004</guid>
      <dc:date>2008-10-01T06:27:27Z</dc:date>
      <clearspace:dateToText>1 year, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>13</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1063986?tstart=0#1063986</link>
      <description>Could it be that there are no raw disks ?&lt;br /&gt;
Perhaps try without the test for "physicalMode".&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;$report = @() 
$vms = Get-VM | Get-View 
foreach($vm in $vms) {
			foreach($dev in $vm.Config.Hardware.Device)	{
				if(($dev.gettype()).Name -eq &amp;quot;VirtualDisk&amp;quot;)	{ 
#					if($dev.Backing.CompatibilityMode -eq &amp;quot;physicalMode&amp;quot;){ 
						$row = &amp;quot;&amp;quot; | select VMName, HDDeviceName, HDFileName 
						$row.VMName = $vm.Name 
						$row.HDDeviceName = $dev.Backing.DeviceName 
						$row.HDFileName = $dev.Backing.FileName 
							$report += $row 
					} 	
#				} 
			} 
} 
$report
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Wed, 01 Oct 2008 05:01:24 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1063986?tstart=0#1063986</guid>
      <dc:date>2008-10-01T05:01:24Z</dc:date>
      <clearspace:dateToText>1 year, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>14</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1063909?tstart=0#1063909</link>
      <description>Hi LucD,&lt;br /&gt;
&lt;p /&gt;
Can you please check attached Script since is not producing any result.&lt;br /&gt;
&lt;p /&gt;
Regards,</description>
      <pubDate>Wed, 01 Oct 2008 00:32:27 GMT</pubDate>
      <author>munizaba@gmail.com</author>
      <guid>http://communities.vmware.com/message/1063909?tstart=0#1063909</guid>
      <dc:date>2008-10-01T00:32:27Z</dc:date>
      <clearspace:dateToText>1 year, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>15</clearspace:replyCount>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1061950?tstart=0#1061950</link>
      <description>This gives the devicename of each RDM disk for each vm.&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;$report = @()
$vms = Get-VM | Get-View
foreach($vm in $vms){
  foreach($dev in $vm.Config.Hardware.Device){
    if(($dev.gettype()).Name -eq &amp;quot;VirtualDisk&amp;quot;){
	  if($dev.Backing.CompatibilityMode -eq &amp;quot;physicalMode&amp;quot;){
	    $row = &amp;quot;&amp;quot; | select VMName, HDDeviceName, HDFileName
          $row.VMName = $vm.Name
	    $row.HDDeviceName = $dev.Backing.DeviceName
	    $row.HDFileName = $dev.Backing.FileName
	    $report += $row
	  }
	}
  }
}
$report
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Mon, 29 Sep 2008 08:16:57 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1061950?tstart=0#1061950</guid>
      <dc:date>2008-09-29T08:16:57Z</dc:date>
      <clearspace:dateToText>1 year, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>16</clearspace:replyCount>
    </item>
    <item>
      <title>list disks rdm with powershell</title>
      <link>http://communities.vmware.com/message/1061917?tstart=0#1061917</link>
      <description>&lt;br /&gt;
Hello , &lt;br /&gt;
&lt;p /&gt;
i like how lists disk rdm of a vm .Command get-hardisk give me location vmdk , capacity , but i want more informatation disks RDMs&lt;br /&gt;
&lt;p /&gt;
 Por example , i want to list imformation like vmhba 1:0:9:0 , SCSI (2:1) , etc  for each disk .  &lt;br /&gt;
&lt;p /&gt;
Someone can gime some help&lt;br /&gt;
&lt;p /&gt;
Thanks</description>
      <pubDate>Mon, 29 Sep 2008 07:17:00 GMT</pubDate>
      <author>Josito</author>
      <guid>http://communities.vmware.com/message/1061917?tstart=0#1061917</guid>
      <dc:date>2008-09-29T07:17:00Z</dc:date>
      <clearspace:dateToText>1 year, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>17</clearspace:replyCount>
    </item>
  </channel>
</rss>

