Closed Vulp-OS closed 9 years ago
Thank you for highlighting this problem.
I removed the type for the variable $Datastore. Instead, I use [ValidateScript()] validation for the parameter Datastore and check for the type being VmfsDatastoreImpl or NasDatastoreImpl.
You can double-check, but I'm pretty confident this fixes the problem.
On line 89 of Get-StorageViewsReport.psm1, you give the variable $Datastore a type of [VMware.VimAutomation.ViCore.Impl.V1.DatastoreManagement.VmfsDatastoreImpl[]]
For vmWare configurations where the type NasDatastoreImpl is also used, your code fails. If you don't explicitly declare the type of this variable, the code works for both types.