Hey,
Try the following script:
$esxi = Get-VMHost -Name "Name of ESXi"
$esxcli = Get-ESXCLI -VMHost $esxi
$datastore_list = Get-Datastore -VMHost $esxi
$path_list = $esxcli.storage.core.path.list()
$output = $datastore_list | Foreach-Object {
$datastore = $_
$path_list | where {$_.Device -eq $datastore.ExtensionData.Info.Vmfs.Extent.diskname} | Get-Unique | Select @{N="Datastore";E={ $datastore.Name }}, Device, LUN
}
$output