Hello everyone! Really need some help trying to get this monitor off the ground.
We have a Windows Server 2008 Cluster and I'm trying to get the current owner of a resource. Unfortunately, I haven't seen anything in the Microsoft Windows Server 2008 Failover Cluster template that can do that or inform us if the resource has moved.
So we wrote a simple powershell script to tell us just that. The script executes successfully when run locally via the desktop. But for some reason, I can't seem to get to working using the PS script monitor. When I click get script output, it comes back as not defined
$fpstatus = cluster fpncluster res "alpha name" /status; $fpcowner = $fpstatus[10]; $fpcowner = $fpcowner.substring(42,3); if ($fpcowner -eq "alpha3"){ write-host Message.Current Owner: ALPHA3; write-host Statistic: 3; exit 0; } write-host Message.Current Owner: ALPHA4; write-host Statistic: 4; exit 2; |

Can anyone assist?