I just came across this KB, worth sharing.
Extended maintenance mode
Windows Server 2003 SP1 added another feature to the Cluster.exe command-line tool. The tool now waits for the internal state of a resource to stabilize and to complete the online or offline process. This process can be scripted. For example, after you put a resource in extended maintenance mode, the script calls the /waitmaint parameter. The /waitmaint parameter blocks activity until the resource has gone into a full stable state internally. Use the following command syntax to call the /waitmaint parameter:
cluster resource_name /waitmaint[pending]
More here http://support.microsoft.com/kb/903650/