<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: list disks rdm with powershell in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022323#M66265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Chad,&lt;/P&gt;&lt;P&gt;Its good script. But I am looking a script to get the selected VM or all the VMs who has DiskType -eq “RawPhysical”, details with Properties (Host, VM, DiskNumber, Identifier, Policy, VirtualDeviceNode, Capacity )&lt;/P&gt;&lt;P&gt;Can you assist ?&lt;/P&gt;&lt;P&gt;I tried this as below --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Get-RAWDiskInfo {&lt;/P&gt;&lt;P&gt;$RDisks = Get-VM $VM | Get-HardDisk | Where {$_.DiskType -eq “RawPhysical”}&lt;/P&gt;&lt;P&gt;Foreach ($RDisk in $RDisks) {&lt;/P&gt;&lt;P&gt;$Lun = Get-VMHost -name (Get-VM $VM).VMHost | Get-SCSILun $RDisk.SCSICanonicalName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$Props = @{ 'VM Name' = $RDisk.Parent;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'DiskType' = $RDisk.DiskType;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Name' = $RDisk.Name;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Filename' = $RDisk.Filename;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Scsi Name' = $RDisk.ScsiCanonicalName;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'LUN ID' = $Lun.RuntimeName.Substring($Lun.RuntimeName.LastIndexof(“L”)+1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;New-Object -TypeName PSObject -Property $props&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Aug 2013 16:43:11 GMT</pubDate>
    <dc:creator>AmolPatil</dc:creator>
    <dc:date>2013-08-02T16:43:11Z</dc:date>
    <item>
      <title>list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022285#M66227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone can gime some help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2008 07:17:00 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022285#M66227</guid>
      <dc:creator>Josito</dc:creator>
      <dc:date>2008-09-29T07:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022286#M66228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This gives the devicename of each RDM disk for each vm.&lt;/P&gt;&lt;PRE __jive_macro_name="noformat"&gt;
$report = @()
$vms = Get-VM | Get-View
foreach($vm in $vms){
  foreach($dev in $vm.Config.Hardware.Device){
    if(($dev.gettype()).Name -eq "VirtualDisk"){
	  if($dev.Backing.CompatibilityMode -eq "physicalMode"){
	    $row = "" | select VMName, HDDeviceName, HDFileName
          $row.VMName = $vm.Name
	    $row.HDDeviceName = $dev.Backing.DeviceName
	    $row.HDFileName = $dev.Backing.FileName
	    $report += $row
	  }
	}
  }
}
$report
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2008 08:16:57 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022286#M66228</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2008-09-29T08:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022287#M66229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi LucD,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please check attached Script since is not producing any result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2008 00:32:27 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022287#M66229</guid>
      <dc:creator>munizaba</dc:creator>
      <dc:date>2008-10-01T00:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022288#M66230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could it be that there are no raw disks ?&lt;/P&gt;&lt;P&gt;Perhaps try without the test for "physicalMode".&lt;/P&gt;&lt;PRE __jive_macro_name="noformat"&gt;
$report = @() 
$vms = Get-VM | Get-View 
foreach($vm in $vms) {
			foreach($dev in $vm.Config.Hardware.Device)	{
				if(($dev.gettype()).Name -eq "VirtualDisk")	{ 
#					if($dev.Backing.CompatibilityMode -eq "physicalMode"){ 
						$row = "" | select VMName, HDDeviceName, HDFileName 
						$row.VMName = $vm.Name 
						$row.HDDeviceName = $dev.Backing.DeviceName 
						$row.HDFileName = $dev.Backing.FileName 
							$report += $row 
					} 	
#				} 
			} 
} 
$report
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2008 05:01:24 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022288#M66230</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2008-10-01T05:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022289#M66231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks mate, is working now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$report = @() &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$vms = Get-VM | Get-View &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreach($vm in $vms) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreach($dev in $vm.Config.Hardware.Device) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(($dev.gettype()).Name -eq "VirtualDisk") { &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$row = "" | &lt;STRONG&gt;select&lt;/STRONG&gt; VMName, HDDeviceName, HDFileName &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$row.VMName = $vm.Name &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$row.HDDeviceName = $dev.Backing.DeviceName &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$row.HDFileName = $dev.Backing.FileName &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$report += $row &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2008 06:27:27 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022289#M66231</guid>
      <dc:creator>munizaba</dc:creator>
      <dc:date>2008-10-01T06:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022290#M66232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just came to realise that RDMs come in 2 flavours, physical and virtual.&lt;/P&gt;&lt;P&gt;Since I only tested for physical and your RDMs are probably in virtual compatibility mode they didn't show.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This script should only show RDMs but for both compatibility modes&lt;/P&gt;&lt;PRE __jive_macro_name="noformat"&gt;
$report = @()
$vms = Get-VM | Get-View
foreach($vm in $vms){
  foreach($dev in $vm.Config.Hardware.Device){
    if(($dev.gettype()).Name -eq "VirtualDisk"){
	  if(($dev.Backing.CompatibilityMode -eq "physicalMode") -or 
	     ($dev.Backing.CompatibilityMode -eq "virtualMode")){
	    $row = "" | 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;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2008 11:23:06 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022290#M66232</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2008-10-01T11:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022291#M66233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 15:43:41 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022291#M66233</guid>
      <dc:creator>brekus</dc:creator>
      <dc:date>2008-12-12T15:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022292#M66234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi all ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I was wondering how to add the RDM size to this table ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 09:46:42 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022292#M66234</guid>
      <dc:creator>gboskin</dc:creator>
      <dc:date>2009-01-06T09:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022293#M66235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answer is in  &lt;SPAN __jive_macro_name="message" id="1136794"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:04:59 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022293#M66235</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2009-01-06T10:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022294#M66236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Emma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 13:04:53 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022294#M66236</guid>
      <dc:creator>emmar</dc:creator>
      <dc:date>2009-04-22T13:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022295#M66237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the &lt;A href="http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.VirtualMachine.html"&gt;VirtualMachine&lt;/A&gt; object contains, under the &lt;STRONG&gt;Runtime.Host&lt;/STRONG&gt; property, a MoRef to the host on which the VM is running or assigned.&lt;/P&gt;&lt;P&gt;The script could then be something like this:&lt;/P&gt;&lt;PRE __jive_macro_name="noformat"&gt;
$report = @()
$vms = Get-VM  | Get-View
foreach($vm in $vms){
  foreach($dev in $vm.Config.Hardware.Device){
    if(($dev.gettype()).Name -eq "VirtualDisk"){
	  if(($dev.Backing.CompatibilityMode -eq "physicalMode") -or 
	     ($dev.Backing.CompatibilityMode -eq "virtualMode")){
	    $row = "" | 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;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 13:20:07 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022295#M66237</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2009-04-22T13:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022296#M66238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks LucD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thats great! And a useful link so hopefully i can work more out for myself!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; E&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 14:15:04 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022296#M66238</guid>
      <dc:creator>emmar</dc:creator>
      <dc:date>2009-04-22T14:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022297#M66239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks man, this is such a useful script !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;AWT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 03:00:08 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022297#M66239</guid>
      <dc:creator>AlbertWT</dc:creator>
      <dc:date>2009-06-19T03:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022298#M66240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EMC Fibre Channel Disk (naa.60060480000190100744533031393736)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom Cronin, VCP, VMware vExpert 2009 - Co-Leader Buffalo, NY VMUG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 14:21:53 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022298#M66240</guid>
      <dc:creator>TCronin</dc:creator>
      <dc:date>2009-09-21T14:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022299#M66241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suspect you are after the DisplayName as it's called in the SDK Reference.&lt;/P&gt;&lt;P&gt;Try this script, the DisplayName has been added.&lt;/P&gt;&lt;PRE __jive_macro_name="noformat"&gt;
$report = @()
$vms = Get-VM | Get-View
foreach($vm in $vms){
	foreach($dev in $vm.Config.Hardware.Device){
		if(($dev.gettype()).Name -eq "VirtualDisk"){
			if(($dev.Backing.CompatibilityMode -eq "physicalMode") -or 
			($dev.Backing.CompatibilityMode -eq "virtualMode")){
				$row = "" | 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;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 20:51:52 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022299#M66241</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2009-09-21T20:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022300#M66242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks LucD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to add Runtime Name and Lun Name  in the display of your script ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (This data is available in VCenter 4, on manage Path of the RDM Disk)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regads, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 14:20:50 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022300#M66242</guid>
      <dc:creator>jsenon</dc:creator>
      <dc:date>2009-10-23T14:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022301#M66243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nobody have an idea ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 21:29:09 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022301#M66243</guid>
      <dc:creator>jsenon</dc:creator>
      <dc:date>2009-10-26T21:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022302#M66244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This script is very helpful.  I have trying to figure out how to add 'Runtime Name:' and 'Adpater:' information to this report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Any thoughts on how to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fc.200000e08b9bad3f:210000e08b9bad3f-fc.50060160c1e02ae9:5006016141e02ae9-naa.60060160efe01900c883b8dee114de11&lt;/P&gt;&lt;P&gt;   Runtime Name: vmhba1:C0:T0:L22&lt;/P&gt;&lt;P&gt;   Device: naa.60060160efe01900c883b8dee114de11&lt;/P&gt;&lt;P&gt;   Device Display Name: DGC Fibre Channel Disk (naa.60060160efe01900c883b8dee114de11)&lt;/P&gt;&lt;P&gt;   Adapter: vmhba1 Channel: 0 Target: 0 LUN: 22&lt;/P&gt;&lt;P&gt;   Adapter Identifier: fc.200000e08b9bad3f:210000e08b9bad3f&lt;/P&gt;&lt;P&gt;   Target Identifier: fc.50060160c1e02ae9:5006016141e02ae9&lt;/P&gt;&lt;P&gt;   Plugin: NMP&lt;/P&gt;&lt;P&gt;   State: active&lt;/P&gt;&lt;P&gt;   Transport: fc&lt;/P&gt;&lt;P&gt;   Adapter Transport Details: WWNN: 20:00:00:e0:8b:9b:ad:3f WWPN: 21:00:00:e0:8b:9b:ad:3f&lt;/P&gt;&lt;P&gt;   Target Transport Details: WWNN: 50:06:01:60:c1:e0:2a:e9 WWPN: 50:06:01:61:41:e0:2a:e9&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Oct 2009 20:08:24 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022302#M66244</guid>
      <dc:creator>zMarkz</dc:creator>
      <dc:date>2009-10-31T20:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022303#M66245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Handy script. Did anyone manage to work out how to report lun number and vmhba path...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script currently gives:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VMName        : ctx01&lt;/P&gt;&lt;P&gt;VMHost        : esx1.corp.com&lt;/P&gt;&lt;P&gt;HDDeviceName  : vml.020000000060a9800050334c77465a5256777954344c554e202020&lt;/P&gt;&lt;P&gt;HDFileName    : &lt;A href="https://communities.vmware.com/citrix"&gt;&lt;/A&gt; ctx01/ctx01_1.vmdk&lt;/P&gt;&lt;P&gt;HDMode        : physicalMode&lt;/P&gt;&lt;P&gt;HDsize        : 10485760&lt;/P&gt;&lt;P&gt;HDDisplayName : NETAPP Fibre Channel Disk (naa.60a9800050334c77465a525677795434)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I was hoping to see - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LUNnumber : 102&lt;/P&gt;&lt;P&gt;VMhbapath: vmhba1:0:102&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mike Laverick&lt;/P&gt;&lt;P&gt;RTFM Education&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.rtfm-ed.co.uk" target="test_blank"&gt;http://www.rtfm-ed.co.uk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Author of the SRM Book:http://stores.lulu.com/rtfm&lt;/P&gt;&lt;P&gt;Free PDF or at-cost Hard Copy&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://communities.vmware.com/servlet/JiveServlet/download/1200101-20223/vExpert_logo_100x57.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 18:00:03 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022303#M66245</guid>
      <dc:creator>Michelle_Laveri</dc:creator>
      <dc:date>2010-02-17T18:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: list disks rdm with powershell</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022304#M66246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should be pretty trivial by pulling out &lt;STRONG&gt;deviceName&lt;/STRONG&gt; property, I'm sure Luc or Alan could help with pulling that out as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a vSphere SDK for Perl script that utilizes this property to displays the vmhba path and you can extract the LUN # from that as well.&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.vmware.com/d-11135"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=========================================================================&lt;/P&gt;&lt;P&gt;William Lam&lt;/P&gt;&lt;P&gt;VMware vExpert 2009&lt;/P&gt;&lt;P&gt;VMware ESX/ESXi scripts and resources at: &lt;A href="http://engineering.ucsb.edu/~duonglt/vmware/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://twitter.com/lamw"&gt;Twitter: @lamw&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.vmware.com/d-9852"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.vmware.com/d-10878"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.vmware.com/d-10837"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.vmware.com/c-3164"&gt;VMware Code Central - Scripts/Sample code for Developers and Administrators&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.vmware.com/c-2828"&gt;VMware Developer Comuunity&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you find this information useful, please award points for "correct" or "helpful".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 18:30:40 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/list-disks-rdm-with-powershell/m-p/2022304#M66246</guid>
      <dc:creator>lamw</dc:creator>
      <dc:date>2010-02-17T18:30:40Z</dc:date>
    </item>
  </channel>
</rss>

