Hallo there,
I need help, a script to check and report to a cvs file the Cisco Nexus 1000v VEM version on all ESXi hosts connected to a vCenter.
basically, 'vem version -v' but for all the ESXi hosts connected to a vCenter.
Thanks
Joseph
I suspect you might be using PowerShell v1, in that version the Export-Csv didn't have the UseCulture parameter.
Try running the script without that parameter.
But I would strongly advise you to upgrade your PowerShell version (v3 is available)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try something like this
Get-VirtualSwitch -Distributed | where {$_.ExtensionData.Summary.ProductInfo.Vendor -like "Cisco*"} |
Select Name, @{N="Version";E={$_.ExtensionData.Summary.ProductInfo.Version}},
@{N="Hosts";E={[string]::JoIn(',',(Get-View $_.ExtensionData.Summary.HostMember | Select -ExpandProperty Name))}} |
Export-Csv C:\report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you Luc,
I get the error below when I run the script
Export-Csv : A positional parameter cannot be found that accepts argument 'Scripts\report.csv'.
At C:\_LOCALdata\Powershell Scripts\vem_version_checker.ps1:7 char:11
+ Export-Csv <<<< C:\_LOCALdata\Powershell Scripts\report.csv -NoTypeInformation -UseCulture
+ CategoryInfo : InvalidArgument: (:) [Export-Csv], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.ExportCsvCommand
I suspect you might be using PowerShell v1, in that version the Export-Csv didn't have the UseCulture parameter.
Try running the script without that parameter.
But I would strongly advise you to upgrade your PowerShell version (v3 is available)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference