Try something like this
$poolId='MyPool'
$pool=Get-Pool-Pool_id$poolId
$vm=Get-VM-Name$pool.parentVmPath.Split('/')[-1]
$snap=Get-Snapshot-VM$vm|Sort-Object-PropertyCreated-Descending|Select-First1
if($snap.Name -notmatch$pool.parentVMSnapshotPath)
{
$newSnap=$pool.parentVMSnapshotPath.Replace($pool.parentVMSnapshotPath.Split('/')[-1],$snap.Name)
Get-DesktopVM-Pool_id$poolId|
Send-LinkedCloneRecompose-schedule ((Get-Date).AddMinutes(2)) -parentVMPath"/pathforvm/vm"-parentSnapshotPath$newSnap-forceLogoff$false-stopOnError$false
}