So I found a script from someone else that will do the reboot and prompt, however when I try to run the Invoke-VMScript it seems to work, but nothing happens. I have this in my script:
$script = '&env:script\CustomRestart.ps1'
Invoke-VMScript -vm $vm -ScriptText $script -ScriptType Powershell -GuestCredential $GuestCredential
Output appears fine in PowerCLI, but it doesn't run on the VM. What am I missing?