Shahnawaz26
Enthusiast
Enthusiast

PowerCLI Get Virtual Device Node information for Virtual disks

I need to find out the Virtual Device Node for Each Virtual disk...using PowerCLI

Capture.JPG

2 Replies
Shahnawaz26
Enthusiast
Enthusiast

LucD‌  Waiting for your answer :smileyplain:

0 Kudos
LucD
Leadership
Leadership

Try something like this

Get-VM | Get-HardDisk |

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

    @{N='DevNode';E={'{0}:{1}' -f ((Get-ScsiController -HardDisk $_).ExtensionData.BusNumber),$_.ExtensionData.UnitNumber}}


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