Powershell issues on tentacles

Lately we are seeing more and more powershell issues in the Octopus tentacles. We are seeing it in multiple environments and both during package acquisition and package deployment. It can happen in Octopus code or in our code. The common issue is that common powershell functions like Out-String, Test-Path, etc are no longer available and then the deployment fails. I’m having a hard time pinpointing what is causing these issues since the problem started small, but are now failing more and more. Could this be an issue in one of the latest Octopus releases? We upgraded to version 3.4.14 a few days ago and are seeing this error after that

                    |       Running: Download package Confirmit.Server.Bootstrapper version 21.0.4 from http://nynugetserver/artifactory/api/nuget/myfeed/
14:25:42   Verbose  |         Octopus Deploy: Calamari version 3.4.37+Branch.master.Sha.50314019a4a8cd430c3fa2cc346f17e9dd4f7ed7
14:25:54   Error    |         Out-String : The term 'Out-String' is not recognized as the name of a cmdlet,
14:25:54   Error    |         function, script file, or operable program. Check the spelling of the name, or
14:25:54   Error    |         if a path was included, verify that the path is correct and try again.
14:25:54   Error    |         At C:\Octopus\Work\20161103132541-2893\Bootstrap.Script.ps1:17 char:35
14:25:54   Error    |         +     Write-Verbose ($PSVersionTable | Out-String)
14:25:54   Error    |         +                                      ~~~~~~~~~~
14:25:54   Error    |         + CategoryInfo          : ObjectNotFound: (Out-String:String) [], ParentCo
14:25:54   Error    |         ntainsErrorRecordException
14:25:54   Error    |         + FullyQualifiedErrorId : CommandNotFoundException


Hi Jan,

We’ve not seen that error before.

I can’t imagine it’s related to an Octopus release; only because if we broke that we would certainly have heard about it :slight_smile:

Is it possible that something in your process is messing with the PSModulePath environment variable? For example, if something was attempting to add an entry to that variable, but was inadvertently overwriting it, I can imagine that would cause a similar error.

If you log on to a Tentacle after it receives that error can you execute the Out-String cmdlet interactively?


Hi Michael,

Thanks for the feedback. I suspect it might be related to some DSC/PowerShell 5 stuff we are doing on these servers. We are trying to change a couple of things in this area to is if it helps



I wish I could offer a better answer, but I’m not sure I can provide much value on this one.

If there’s anything you think we can help with, don’t hesitate to ask?