VMware Cloud Community
AGFlora
Enthusiast
Enthusiast
Jump to solution

Add Cluster name to Report

Hi

How would I add the Cluster name to the following report?

     Get-Datastore -VM $vm |

  

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

              @{N="VM Name";E={$vm.Name}}

The output for the report would be Cluster, DataStore, VM, etc.

Thanks

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Something like this

Get-Datastore -VM $vm |
   
Select @{N="Cluster";E={Get-Cluster -VM $vm | Select -ExpandProperty Name}},
   
@{N="DataStore";E={$_.Name}},
   
@{N="VM Name";E={$vm.Name}}


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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Something like this

Get-Datastore -VM $vm |
   
Select @{N="Cluster";E={Get-Cluster -VM $vm | Select -ExpandProperty Name}},
   
@{N="DataStore";E={$_.Name}},
   
@{N="VM Name";E={$vm.Name}}


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

Reply
0 Kudos
AGFlora
Enthusiast
Enthusiast
Jump to solution

Thanks Luc

Reply
0 Kudos