Don't run it against those machines. Create a scope in Pulseway and apply the job / script to that scope and don't include those machines. Â
If you don't want to do that, then modify the script and using this. Change the PCNames to the ones you don't want it to run on, and then yea, it will just exit with a success if it sees those names. If you are on machines that are all PowerShell 3.0 and above, then you can also use $env:computername -in $Exclusions as well. -contains is PowerShell 2 compatible.
Â
Â
$Exclusions = @("PCName1", "PCName2", "PCName3")
Â
if ($Exclusions -contains $env:COMPUTERNAME) {
  Exit 0
}
else {
  PLACE REST OF CODE HERE
}