After appending the -DisableNameChecking flag on each my import-module calls, I was still getting the warning. So, on a hunch, I replaced my whole PostDeploy.ps1 script with a single variable declaration. I still get the warnings.
I think these are a result of Octopus doing some importing behind the scenes and no changes to my own script will suppress them. Is there a configuration option to have Octopus suppress these? I’d rather not have unavoidable Octopus red-herrings in our logs.
Thanks for sending the logs. If this warning shows up even if the PostDeploy script is empty, then it must be a module that’s installed on the tentacle box that’s being imported when octopus opens a powershell session.
Could you please add a Powershell Step to your deployment process and just have it run write-host "Hello from Powershell step" . If the warning shows up even in that case, then that’ll prove my theory.
You were right. I actually did have script modules in my process. For whatever reason, I had step templates and script modules mixed up. A while ago, I was testing the idea of using the Octopus API during the deployment process but eventually decided against it. I left the script module references in and forgot about them.
I actually got so far as testing two projects with identical steps and an identical nuget package before a colleague pointed out that one showed script modules and the other didn’t! Another case of selective blindness.