If you're just looking for a PowerShell script that runs in loop forever, is this what you're looking for?
$Drives = "C:\", "X:\"
Do{
$drives |
ForEach-Object {
if (-NOT (test-path $_)){
Throw "Path $_ is no longer available"
}
}
Start-Sleep -Seconds 5
} while ($true)