I'm integrating Jenkins with a bunch of stuff and im using powershell to do this. I have a script on a remote machine that is executed after a build is successful on jenkins. This script does a bunch of stuff and then will restart the machine.

What i need to do is:

1. Return to jenkins that the script was successful (meaning that it will end the job as SUCCESS)
2. Then restart the machine

So far i have not managed to send 'EXIT 0' to jenkins and then restart the machine. There's anyway to do this?

Thanks in advance.

Code example:

```
Write-Host "Code example"
Exit 0 #for jenkins success
Restart-Computer -Force

```