Using Get-DataStore
cmdlet we get the name of datastore as Datasore1
. But I need path of that datastore on ESX. Which is something like /vmfs/volumes/<id>/
.
Asked
Active
Viewed 8,344 times
2

JasonMArcher
- 14,195
- 22
- 56
- 52

VarunVyas
- 1,357
- 6
- 15
- 23
1 Answers
5
The path is hidden inside ExtensionData property, so assign your datastore to a variable:
$s = Get-Datastore Datasore1
and then extract the path:
$s.ExtensionData.info.url
result:
/vmfs/volumes/50cb7918-d31a7b14-f5a7-d89d676e15pl

Raf
- 9,681
- 1
- 29
- 41