Yes same error for all intervals.
Here is the output.
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $ds = Get-Datastore datastore4
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-Stat2 -Entity $ds.ExtensionData -Interval HI1 -QueryMetrics |
>> Select Group,Name,Rollup | ft -AutoSize
>>
Exception calling "QueryAvailablePerfMetric" with "4" argument(s): "A general system error occurred: optional value not set"
At C:\Users\username\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:91 char:3
+ $metrics = $perfMgr.QueryAvailablePerfMetric($Entity.MoRef,$null,$null,$numint ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-Stat2 -Entity $ds.ExtensionData -Interval HI1 -Stat disk.used.latest -QueryInstances
Exception calling "QueryAvailablePerfMetric" with "4" argument(s): "A general system error occurred: optional value not set"
At C:\Users\username\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:137 char:3
+ $metricId = $perfMgr.QueryAvailablePerfMetric($Entity.MoRef,$null,$null,$numin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $ds = Get-Datastore datastore4
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-Stat2 -Entity $ds.ExtensionData -Interval HI2 -QueryMetrics |
>> Select Group,Name,Rollup | ft -AutoSize
>>
Exception calling "QueryAvailablePerfMetric" with "4" argument(s): "A general system error occurred: optional value not set"
At C:\Users\username\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:91 char:3
+ $metrics = $perfMgr.QueryAvailablePerfMetric($Entity.MoRef,$null,$null,$numint ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-Stat2 -Entity $ds.ExtensionData -Interval HI2 -Stat disk.used.latest -QueryInstances
Exception calling "QueryAvailablePerfMetric" with "4" argument(s): "A general system error occurred: optional value not set"
At C:\Users\username\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:137 char:3
+ $metricId = $perfMgr.QueryAvailablePerfMetric($Entity.MoRef,$null,$null,$numin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>
Thanks,
JB