Excellent answer! That fixed it for me- Thank you!
It turned out that this powercli command for some reason was using the default OS user proxy settings from the reg key: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ -> ProxyEnable [=1]
I had wrote the script before we had a security change (and the script worked then) where certain PCs were internet restricted with the proxy enabled and pointing to a non-existent proxy server to kill internet access for security reasons. So when I ran the script now after some changes, it stopped working.
What is interesting is when the command fails I can connect to a vCenter server just fine with the command connect-viserver [servername], I can run all kinds of commands like update-tools on Guests etc without issue. It doesn't yet make logical sense why just invoke-vmscript doesn't work while the other commands do. The invoke-vmscript must have something in it that tries to connect to something that is the not the vCenter server and that is using the local proxy and is therefore failing.
Also, I noticed that even after changing the reg key, the command still failed until I opened IE and closed it. Not sure if coincidental but seemed to be the case.
Thanks again!