The following PowerShell function uses vSphere PowerCLI to return the full path to a datastore in a cluster as specified by a resource pool.

# VVGetDatastorePath
# Parameters
#     $Datastore Datastore object in vSphere PowerCLI.
#     $ResourcePool Resource pool in cluster.
# 				VVGetDatastorePath (Get-Datastore "datastore1") (Get-ResourcePool "Resources")

function VVGetDatastorePath($Datastore,$ResourcePool){
    if($Datastore -and $ResourcePool){

        $dsType = $Datastore.GetType().Name
        $rpType = $ResourcePool.GetType().Name
        if(-not ($dsType.Contains("Datastore")) ){
            Write-Error "The Datastore provided is not a Datastore object."
        if(-not ($rpType.Contains("ResourcePool")) ){
            Write-Error "The Resource Pool provided is not a ResourcePool object."

        $ClusterPath = VVGetPath(Get-Inventory -Id $ResourcePool.ParentId)
        $path = $ClusterPath + "/" + $Datastore.Name