VMware Cloud Community
vmk2014
Expert
Expert
Jump to solution

VMFS version through power cli

Hi All,

I want to pull the report for VMFS version for all cluster. Since we are planning to decommission  VMFS 5. The report should include  Hostname, Cluster name, VMFS version.

thanks

vmk

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Sure, try like this

Get-Cluster -PipelineVariable cluster |

   Get-VMHost -PipelineVariable esx |

   ForEach-Object -Process {

   Get-Datastore -RelatedObject $_ |

   where {$_.Type -eq 'VMFS' -and $_.ExtensionData.Summary.MultipleHostAccess} |

  Select @{N = 'Cluster'; E = {$cluster.Name}},

   @{N = 'VMHost'; E = {$esx.Name}},

  Name, FileSystemVersion

}


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

View solution in original post

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

Try something like this

Get-Cluster -PipelineVariable cluster |

   Get-VMHost -PipelineVariable esx |

   ForEach-Object -Process {

   Get-Datastore -RelatedObject $_ |

   where {$_.Type -eq 'VMFS'} |

  Select @{N = 'Cluster'; E = {$cluster.Name}},

   @{N = 'VMHost'; E = {$esx.Name}},

  Name, FileSystemVersion

}


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

Reply
0 Kudos
vmk2014
Expert
Expert
Jump to solution

Thank you LucD. Is there any way to exclude Local  data store ?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Sure, try like this

Get-Cluster -PipelineVariable cluster |

   Get-VMHost -PipelineVariable esx |

   ForEach-Object -Process {

   Get-Datastore -RelatedObject $_ |

   where {$_.Type -eq 'VMFS' -and $_.ExtensionData.Summary.MultipleHostAccess} |

  Select @{N = 'Cluster'; E = {$cluster.Name}},

   @{N = 'VMHost'; E = {$esx.Name}},

  Name, FileSystemVersion

}


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

Reply
0 Kudos