VMware Cloud Community
ganapa2000
Hot Shot
Hot Shot
Jump to solution

VM`s list with Disk and RDM details needed

Hi All,

I have a scripts, which would give me list of below parameters

Name   

PowerState

IP Address

Cluster

ESX Host

Folder

Datastore

I would like to have disk info and RDM info along with its size.

Please help in editing the below script

Get-VM | Select Name, PowerState,

@{N="IP Address";E={@($_.guest.IPAddress[0])}}, `

@{N="Cluster";E={Get-Cluster -VM $_}}, `

@{N="ESX Host";E={Get-VMHost -VM $_}}, `

@{N="Folder";E={$_.Folder.Name}}, `

@{N="Datastore";E={Get-Datastore -VM $_}} | `

0 Kudos
1 Solution

Accepted Solutions
pkolom
Enthusiast
Enthusiast
Jump to solution

Hi,

here's modified script:

Get-VM | Select Name, PowerState,

@{N="IP Address";E={@($_.guest.IPAddress[0])}},

@{N="Cluster";E={Get-Cluster -VM $_}},

@{N="ESX Host";E={Get-VMHost -VM $_}},

@{N="Folder";E={$_.Folder.Name}},

@{N="Datastore";E={Get-Datastore -VM $_}},

@{N="RDM type";E={(Get-HardDisk -VM $_ -DiskType RawPhysical,RawVirtual).DiskType}},

@{N="RDM disk name";E={(Get-HardDisk -VM $_ -DiskType RawPhysical,RawVirtual).Filename}}

Lines 8 and 9 are added to your script. You can add another lines in similar way.

View solution in original post

0 Kudos
2 Replies
pkolom
Enthusiast
Enthusiast
Jump to solution

Hi,

here's modified script:

Get-VM | Select Name, PowerState,

@{N="IP Address";E={@($_.guest.IPAddress[0])}},

@{N="Cluster";E={Get-Cluster -VM $_}},

@{N="ESX Host";E={Get-VMHost -VM $_}},

@{N="Folder";E={$_.Folder.Name}},

@{N="Datastore";E={Get-Datastore -VM $_}},

@{N="RDM type";E={(Get-HardDisk -VM $_ -DiskType RawPhysical,RawVirtual).DiskType}},

@{N="RDM disk name";E={(Get-HardDisk -VM $_ -DiskType RawPhysical,RawVirtual).Filename}}

Lines 8 and 9 are added to your script. You can add another lines in similar way.

0 Kudos
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Hi,

Thanks for your reply, but I am not getting VMFS details

0 Kudos