I've tried it both ways with a lot of different variants. Neither work so far. The second worked unless there was more then one VM in the folder. I am by no means a scripting wiz kid. Probably something simple.
connect-viserver servername
$vm = Get-Folder -Name "TEST" |Get-vm
foreach($vm in Get-VM)
{$snap = Get-Snapshot -VM $vm | Sort-Object -Property Created -Descending | Select -First 1
Set-VM -VM $vm -SnapShot $snap -Confirm:$false
connect-viserver servername
$vm = Get-Folder -Name "TEST" |Get-vm
foreach($vm in Get-VM)
$snap = Get-Snapshot -VM $vm | where {$_.IsCurrent -eq $true}
Set-VM -VM $vm -SnapShot $snap -Confirm:$false