First of all thank you for your help. I did try to excute the script but it fails with an error. Anything i'm missing ?
PS D:\xyz> D:\xyz\Get-FreeSpace-BI.ps1
Name Port User
---- ---- ----
mydomain... 443 mydomain\username
Get-Datastore : 9/23/2020 2:31:23 AM Get-Datastore The Location parameter accepts only Datacenter, Folder and
DatastoreCluster objects. You specified 'ClusterImpl'.
At D:\xyz\Get-FreeSpace-BI.ps1:14 char:18
+ $datastore = Get-Datastore -Location $cluster |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Datastore], InvalidArgument
+ FullyQualifiedErrorId : Core_GetDatastore_TryValidateParameterListEx_OnProcessRecord_LocationUnsupportedType,V
Mware.VimAutomation.ViCore.Cmdlets.Commands.GetDatastore
Get-Datastore : 9/23/2020 2:31:24 AM Get-Datastore The Location parameter accepts only Datacenter, Folder and
DatastoreCluster objects. You specified 'ClusterImpl'.
At D:\XYZ\Get-FreeSpace-BI.ps1:14 char:18
+ $datastore = Get-Datastore -Location $cluster |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Datastore], InvalidArgument
+ FullyQualifiedErrorId : Core_GetDatastore_TryValidateParameterListEx_OnProcessRecord_LocationUnsupportedType,V
Mware.VimAutomation.ViCore.Cmdlets.Commands.GetDatastore
Get-Datastore : 9/23/2020 2:31:24 AM Get-Datastore The Location parameter accepts only Datacenter, Folder and
DatastoreCluster objects. You specified 'ClusterImpl'.
At D:\XYZ\Get-FreeSpace-BI.ps1:14 char:18
+ $datastore = Get-Datastore -Location $cluster |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Datastore], InvalidArgument
+ FullyQualifiedErrorId : Core_GetDatastore_TryValidateParameterListEx_OnProcessRecord_LocationUnsupportedType,V
Mware.VimAutomation.ViCore.Cmdlets.Commands.GetDatastore
Get-Datastore : 9/23/2020 2:31:24 AM Get-Datastore The Location parameter accepts only Datacenter, Folder and
DatastoreCluster objects. You specified 'ClusterImpl'.
At D:\XYZ\Get-FreeSpace-BI.ps1:14 char:18
+ $datastore = Get-Datastore -Location $cluster |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Datastore], InvalidArgument
+ FullyQualifiedErrorId : Core_GetDatastore_TryValidateParameterListEx_OnProcessRecord_LocationUnsupportedType,V
Mware.VimAutomation.ViCore.Cmdlets.Commands.GetDatastore
Get-Datastore : 9/23/2020 2:31:24 AM Get-Datastore The Location parameter accepts only Datacenter, Folder and
DatastoreCluster objects. You specified 'ClusterImpl'.
At D:\XYZ\Get-FreeSpace-BI.ps1:14 char:18
+ $datastore = Get-Datastore -Location $cluster |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Datastore], InvalidArgument
+ FullyQualifiedErrorId : Core_GetDatastore_TryValidateParameterListEx_OnProcessRecord_LocationUnsupportedType,V
Mware.VimAutomation.ViCore.Cmdlets.Commands.GetDatastore
Get-Datastore : 9/23/2020 2:31:25 AM Get-Datastore The Location parameter accepts only Datacenter, Folder and
DatastoreCluster objects. You specified 'ClusterImpl'.
At D:\XYZ\Get-FreeSpace-BI.ps1:14 char:18
+ $datastore = Get-Datastore -Location $cluster |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Datastore], InvalidArgument
+ FullyQualifiedErrorId : Core_GetDatastore_TryValidateParameterListEx_OnProcessRecord_LocationUnsupportedType,V
Mware.VimAutomation.ViCore.Cmdlets.Commands.GetDatastore
Get-Datastore : 9/23/2020 2:31:25 AM Get-Datastore The Location parameter accepts only Datacenter, Folder and
DatastoreCluster objects. You specified 'ClusterImpl'.
At D:\XYZ\Get-FreeSpace-BI.ps1:14 char:18
+ $datastore = Get-Datastore -Location $cluster |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Datastore], InvalidArgument
+ FullyQualifiedErrorId : Core_GetDatastore_TryValidateParameterListEx_OnProcessRecord_LocationUnsupportedType,V
Mware.VimAutomation.ViCore.Cmdlets.Commands.GetDatastore
Get-Datastore : 9/23/2020 2:31:25 AM Get-Datastore The Location parameter accepts only Datacenter, Folder and
DatastoreCluster objects. You specified 'ClusterImpl'.
At D:\XYZ\Get-FreeSpace-BI.ps1:14 char:18
+ $datastore = Get-Datastore -Location $cluster |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Datastore], InvalidArgument
+ FullyQualifiedErrorId : Core_GetDatastore_TryValidateParameterListEx_OnProcessRecord_LocationUnsupportedType,V
Mware.VimAutomation.ViCore.Cmdlets.Commands.GetDatastore
Get-Datastore : 9/23/2020 2:31:25 AM Get-Datastore The Location parameter accepts only Datacenter, Folder and
DatastoreCluster objects. You specified 'ClusterImpl'.
At D:\XYZ\Get-FreeSpace-BI.ps1:14 char:18
+ $datastore = Get-Datastore -Location $cluster |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Datastore], InvalidArgument
+ FullyQualifiedErrorId : Core_GetDatastore_TryValidateParameterListEx_OnProcessRecord_LocationUnsupportedType,V
Mware.VimAutomation.ViCore.Cmdlets.Commands.GetDatastore
Thanks
V