Using a where –eq statement against the objects provided by the Get-SCSILun either the vendor or model properties ends w/ 0 objects returned. The following is an example:
Example:
1: Get-VMhost myESXHost | Get-SCSILun | where {$_.Model -eq "SYMMETRIX"}
2: Get-VMhost myESXHost | Get-SCSILun | where {$_.Vendor -eq "EMC"}
1: $Test = Get-VMhost myESXHost | Get-SCSILun | where {$_.Model -eq "SYMMETRIX"}
2: $Test[0].Model.Length <-- This returns 16 3: $Test[0].Vendor.Length <-- This returns 8I suggest using –like or –match when querying against these properties. I prefer match, but to each their own. Like so:
1: Get-VMhost myESXHost | Get-SCSILun | where {$_.Model -match "SYMMETRIX"}
2: Get-VMhost myESXHost | Get-SCSILun | where {$_.vendor -like "EM*"}
http://communities.vmware.com/message/1648743
1 comments:
Hi Zsoldier,
The "Vendor" property has been fixed long time ago. The PowerCLI team has just spotted your post so the issue with the "Model" property will be addressed in the future. :)
Thanks,
f012rt
Post a Comment