Updating proxy setting on all tentacles

Is there a way to do this through the script management console? I want to disable it on all so I have this script:

$command = @‘
cmd.exe /C ‘C:\Program Files\Octopus Deploy\Tentacle\tentacle.exe’ proxy --proxyEnable=False
write-host $command

Invoke-Expression -Command:$command

write-host “Completed updating proxy settings”

but when it runs I get this:

cmd.exe /C ‘C:\Program Files\Octopus Deploy\Tentacle\tentacle.exe’ proxy --proxyEnable=False
Cannot start service from the command line or a debugger. A Windows Service must first be installed (using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative tool or the NET START command.
Completed updating proxy settings
Info 08:48:58

PowerShell exit code: 0

Hi Corey,

Thanks for getting in touch! You’ll need to pass --console to tell the command not to try and run as a service.

However you’ll also have to restart the Tentacle agent for it to take effect. You can do this using Tentacle.exe service --stop --start, however the script console task will probably fail due to the restarts. The command ought to still run, just the task in Octopus will appear as if it failed.

Hope that helps!