It might be a timing problem. I would remove the -RunAsync parameter from the first line. The Add-VMHost cmdlet will run synchronously and return when the host is added to the vCenter Server. You can also remove the sleep command because it is not necessary anymore.
Thanks I overlooked that but it didn't make a difference, I'm running it twice in the script that seems to work. Very odd.