assuming that you were to run this after normal business hours, you would normally find

some turned off
some logged off
some abandoned in the middle of whatever word doc they were writing.

so assuming you checked them all (in order of execution)

The WOL check would wakeup only to each selected machine if powered off
the logoff, would only logoff the machines abandoned if selected
it would then deploy and exec the update to each selected machine
and then shutdown each selected machine (probably put a 15 or 30 minute delay)
_________________________
How to ask questions the smart way <-----------> Before you ask