If it is a task running on the vcenter you could try this:
Get-Task | where {$_.ObjectID -eq (Get-VM VMname | select -ExpandProperty Id)} | where {$_.State -eq "Running"}
That will return all the running tasks on that VM.
You can take off the last pipe to get all the tasks for that VM no matter the state.
Probably not the answer you are looking for, but if it is hung you may not be able to use the shutdown guest option. You may have to power off the VM. You can use 'Stop-VM' for that.