Run powershell script on a single machine (once only)

Hi guys,
Each time we do a deploy we run a powershell script which makes a REST call to NewRelic to let them know we have just done a deployment.

The problem is that it gets executed on every server in our cluster so if we have 4 API servers running NewRelic gets notified that we have done 4 different deployments.

Is it possible to just have a powershell script run once? Regardless of how many servers there are?


Hi Ed,

Thanks for getting in touch!

That’s something we’re planning on adding at some point soon but it’s not there now. (We’ll actually make it even easier by telling NewRelic for you)

Your best option is to nominate one of those servers with a specific role for running NewRelic scripts and scope a step just to that role.

Hope that helps!