You will find more information relevant to this subject at the links below:
About Generic Script
Microsoft: Scripting Entry Points
Microsoft: Configuring Generic Applications, Scripts, and Services
Microsoft: Creating a Cluster Resource DLL (Part 4): IsAlive & LooksAlive
Prerequisites for the Cluster
Microsoft: Create a failover cluster
Using PowerShell (PS) to Configure and Run the Cluster
Microsoft: Using PowerShell script make any application highly available