Hi,
I'm trying to get a list of all datastores that are inaccessible. Below is what I have tried, but it returns nothing. I know we have a few in our environment, what am I missing?
$dStore = get-view -viewtype Datastore -Property Name, Summary | where {$_.ExtensionData.Summary.Accessible -eq "False"}
When you use Get-View, you get vSphere objects, not .NET objects.
The Extensiondata part is not needed.
$dStore = get-view -viewtype Datastore -Property Name, Summary | where {$_.Summary.Accessible -eq $false}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
When you use Get-View, you get vSphere objects, not .NET objects.
The Extensiondata part is not needed.
$dStore = get-view -viewtype Datastore -Property Name, Summary | where {$_.Summary.Accessible -eq $false}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ah that was it! Thank you very much.