Maybe this is something you want:
if you change
$snapsched = Get-NaSnapshotSchedule $volume -erroraction "silentlycontinue
to
$snapscheds = get-navol | Select-Object -Property @{n='targetname';e={$_.Name}} | Get-NaSnapshotSchedule
followed with:
foreach ($snapsched in $snapscheds) {
if ($snapsched.weeks -eq 0 -and $snapsched.days -eq 0 -and $snapsched.hours -eq 0 -and $snapsched.minutes -eq 0) {
$snapshotsched = "No"
} else {
$snapshotsched = "Yes"
}
Write-host $snapshotsched - This will tell you if there is a snapshot schedule
}