Octopus Deploy seems to ignore '-WarningAction SilentlyContinue' in a script step

Micheal Schexnayder's Avatar

Micheal Schexnayder

11 Aug, 2017 06:41 PM

I have a script step configured where I use Test-NetConnection to validate that a server is alive before doing some work.

No matter what I do, this line will ALWAYS present a warning in the deploy log if the server is unreachable/unpingable:

$serverState = Test-NetConnection -ComputerName $tentacle -Port $listeningPort -WarningAction SilentlyContinue

When I run this script on the ODServer host in normal Powershell, the command works fine, no output, other than what I'm looking for.

Is there something I can do to make Octopus Deploy respect my -WarningAction SilentlyContinue?

  1. Support Staff 1 Posted by Shane Gill on 14 Aug, 2017 09:24 AM

    Shane Gill's Avatar

    Hi Michael,

    I notice the same behaviour: -WarningAction SilentlyContinue does not suppress warnings in Octopus. I have created a new ticket which you can track and contribute to: https://github.com/OctopusDeploy/Issues/issues/3736


  2. Paul Stovell closed this discussion on 29 Nov, 2017 05:07 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac