Calls shutdown repeatedly while polling.

Windows server 2008 does not listen to the shutdown command on the first time. Usually multiple calls to shutdown need to happen before it initiates the shutdown. The strategy is now to calling shutdown repeatedly while polling for the operating system to shutdown.