You can do it like this:
New-VIProperty-NameDiskName-ObjectTypeDatastore-Value { param($Datastore) [string]::Join(',',($Datastore.ExtensionData.Info.Vmfs.Extent | Select-Object-ExpandPropertyDiskName)) } -Force
You can do it like this:
New-VIProperty-NameDiskName-ObjectTypeDatastore-Value { param($Datastore) [string]::Join(',',($Datastore.ExtensionData.Info.Vmfs.Extent | Select-Object-ExpandPropertyDiskName)) } -Force