Here you go
Connect-VIServer -Server
"vcenter Name or IP address"$Cluster= get-Cluster "Cluster Name"
$vms = $cluster |Get-VM
$output=""|Select Name, PowerState,CPU,Memory,InstalledOS,VMwareToolVersion,hardwareVersion
foreach($vm in $vms)
{
$output.Name = $vm.Name
$output.PowerState=$vm.PowerState
$output.CPU= $vm.NumCPU
$output.Memory= $vm.memoryGB
$output.InstalledOS= ($vm|Get-view).Guest.GuestFullName
$output.VMwareToolVersion= ($vm|Get-View).Guest.ToolsVersion
$output.hardwareVersion=($vm|get-View).config.Version
$output
$output|Export-csv -Path C:\users\adm.jatin.purohit\desktop\VMReport.csv -Append -NoTypeInformation
}