PowerShell not Found

One problem and no working solutions. Version : 2020.2.14.0
image

info:
powershell.exe -NonInteractive -NoProfile -Command “Write-Output $PSVersionTable.PSVersion”
System.Exception: Error when attempting to execute powershell.exe: Object reference not set to an instance of an object.
—> System.NullReferenceException: Object reference not set to an instance of an object.
at Octopus.Shared.Util.SilentProcessRunner.ExecuteCommand(String executable, String arguments, String workingDirectory, Action1 debug, Action1 info, Action1 error, NetworkCredential runAs, IDictionary2 customEnvironmentVariables, CancellationToken cancel)
— End of inner exception stack trace —
at Octopus.Shared.Util.SilentProcessRunner.ExecuteCommand(String executable, String arguments, String workingDirectory, Action1 debug, Action1 info, Action1 error, NetworkCredential runAs, IDictionary2 customEnvironmentVariables, CancellationToken cancel)
at Octopus.Shared.Util.SilentProcessRunner.ExecuteCommand(String executable, String arguments, String workingDirectory, Action1 info, Action1 error, NetworkCredential runAs, IDictionary`2 customEnvironmentVariables, CancellationToken cancel)
at Octopus.Manager.Server.PreReq.PowerShellPrerequisite.CheckPowerShellIsInstalled(String& commandLineOutput)

image

image

image

Hi Andrey,

Thank you for contacting Octopus. I’m sorry that you are running into this issue.

I hope you don’t mind, I have a few clarifying questions:

  • What version of Octopus are you running?
  • What version of Windows Server are you running?
  • What version of .NET Framework are you running?
  • What antivirus product(s) is/are installed on this machine?

I look forward to hearing back from you and helping you get this resolved.

Regards,
Donny

Octopus Deploy Manager - 2020.2.14.0
Windows: Windows 10 Corporate edition 10.0.17134
.net framework: probably all of them
antivirus : Kaspersky endpointsecurity

Probably octopus can’t open console window.
Can you add more human readable exception message to this method? Also I can’t find any generated logs. Maybe octopus not logging anything at this point

Hi Andrey,

Thank you for the update.

While we do not support Windows Desktop operating systems (here is a list of supported Windows Server versions), I’m happy to keep a question and answer dialogue open to help you get this working.

Here is a list of a few things to try (in order):

  1. Disable Kaspersky Endpoint Security (you may even need to temporarily uninstall it)

  2. Uninstall all .NET framework and .NET Core versions, then install .NET framework 4.8 and .NET Core 3.1

  3. If you are using a domain account, try installing as a local system account with administrator privileges

Let me know if you have any luck when trying the above.

Regards,
Donny