VMware Cloud Community
online11
Contributor
Contributor
Jump to solution

powercli script that gets VM name, OS TYPE, Disk naa.id

Hi everyone,   Can you help me on this I need a powercli script that gets VM name, OS TYPE, Disk naa.id and checks if it is RDM or VMFS disk?   Thanks in advance.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You mean something like this?

Get-VM | Get-HardDisk |

Select @{N='VM';E={$_.Parent.Name}},

    @{N='Guest OS';E={$_.Parent.Guest.OSFullName}},

    Name,

    @{N='RDM';E={$_.DiskType -match "^Raw"}},

    @{N='CanonicalName';E={$_.ScsiCanonicalName}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

You mean something like this?

Get-VM | Get-HardDisk |

Select @{N='VM';E={$_.Parent.Name}},

    @{N='Guest OS';E={$_.Parent.Guest.OSFullName}},

    Name,

    @{N='RDM';E={$_.DiskType -match "^Raw"}},

    @{N='CanonicalName';E={$_.ScsiCanonicalName}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
online11
Contributor
Contributor
Jump to solution

Thanks master!

0 Kudos