Error when starting octopus manager - Windows PowerShell 2.0 or above

Hi @tabrahams1,

Thanks for the screenshots and additional information.

It looks like the Octopus Server has finished installing, are you able to go to “C:\Program Files” and see if the folder path “Octopus Deploy\Octopus” exists and within that folder if the file ‘Octopus.Server.Exe’ is there?

Kind Regards,
Adam

Hi @adam.hollow

Yes it exist, screen shot below

That’s great!

It’s a long shot but I’m wondering if opening Octopus Manager inside the context of PowerShell would allow it to pass the check?
Could you try navigating to that folder in PowerShell and running the manager exe, please?
Similar to the following:

cd “C:\Program Files\Octopus Deploy\Octopus”
&.\Octopus.Manager.Server.exe

Let me know what the results of this are, please!

Kind Regards,
Adam

Hi @adam.hollow

We have run the command and no difference the PS error still pops up.

It does not bypass. Our system admin guys are asking if it could possibly be compatibility issues with the OS. My VM which it works on uses Windows 10 and our deployment servers use Windows 2012 R2

regards
T

regards
T

Hi @tabrahams1,

This Operating System should be fine to run Octopus Deploy, in fact; we test against this OS version!
The information on OS compatibility can be found in our Installation Requirements docs.

Would it be possible to try installing Octopus on a new 2012R2 VM, or are you also using this server for other production-level software?
Something doesn’t seem right with how PowerShell is acting on that machine and attempting an install on a fresh VM may yield different results.

Kind Regards,
Adam

Thanks @adam.hollow

I’m waiting on our sys admin team to take a look at the remote machine for me.

It was escalated to a more senior person, so I’m just waiting on input.

regards
T

Thanks for the update, @tabrahams1!

Let us know if there’s anything else we can do or when you hear back from your sys admin team.

Kind Regards,
Adam

Hi @adam.hollow

I’ve ran the octopus cmd with the following PS function, the only way I can get an output result “Write-Output”, unfortunately I cant edit the octopus src file that runs the installation cmd?

Hi @tabrahams1,

Thanks for getting back in touch.
Is this on a different machine to the one you were originally trying on?

Would you be able to screencap the output of just $PSVersionTable and also the output of [intptr]::size please?

Are you able to update the version of PowerShell running on the machine, at all? Upgrading to the most recent version of PowerShell available for your OS may help to resolve the issue.

Kind Regards,
Adam

Hi Yes

This another of our deployment server, but it has the same setup as the previous server i was trying to deploy Octopus on. i have issues installing on both these server.

Please see results below as requested
$PSVersionTable & [intptr]::size

Thanks for sending over the outputs of those commands.

Can I ask how you’re launching the Octopus Manager? Are you right-clicking the icon and running it as admin or running it under your regular user account?

Would you be able to try running the manager as Local Admin to see if there is any difference?

It does seem like the source of this particular issue is environmental but determining where in the environment is proving to be difficult.

Please let me know the results of the above or if you’ve tried it already and if anything changed.

Kind Regards,
Adam

Hi @adam.hollow

I have run as admin user, its however only works when i add a “Write-Output” function

Hi @adam.hollow

I’ve spoken to our sys admin team, the have reinstalled PS v5.1 as shown in message above.

They ask if the cmd ran for PS check should be written differently for windows 2012 R2 vs windows10.

on Windows 2012 R2 we are able to get the desired results but only when running the script as follows Write-Output powershell.exe -NonInteractive -NoProfile -Command "Write-Output $PSVersionTable.PSVersion"

Regards
T

Hi @tabrahams1

There should be no difference required in the PowerShell check for the different operating systems, there shouldn’t be any issues running the installer on Windows 2012R2.

The reason the command gives that output when you add Write-Output to the start is that it treats the command as a string and prints it literally, rather than actually running the command.
This means that PowerShell.exe isn’t actually called from within the window, what’s actually happening is PowerShell is printing “powershell.exe -NonInteractive -NoProfile -Command” as a string, then printing out “write-Output”, then the variable object $PSVersionTable.PSVersion.

With this interaction being how it is, I expect you would see the same result from this:

>"$PSVersionTable.PSVersion"
System.Collections.Hashtable.PSVersion

Notice how the above variable is encapsulated in quotes, this will cause the variable object to be printed literally: ‘System.Collections.Hashtable.PSVersion’.

If you type the variable without quotes in the command line, that is when you would get the version table.

>$PSVersionTable.PSVersion
Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      17763  592

Could you try the above and see if you experience the same behaviour?

The issues seem to appear when calling PowerShell from the command line as if the output is being redirected.

Kind Regards,
Adam

Hi @adam.hollow

Yes I get the results as mentioned above

Hi @tabrahams1,

Thanks for checking that for me.

I had a further dig through the ticket discussion we had over e-mail previously.
I noticed in the application logs you sent over there were logs for McAfee.
We’ve had reports previously of PowerShell 2.0 checks failing due to specifically McAfee.

Would your sysadmin team be able to inspect the settings on McAfee on the Windows Server?
As it seems, McAfee can block certain PowerShell functionality.
It would even be worth it to place the Octopus install and home folder within a white-list to avoid blocks in future also.

As well as the above, would you be able to try running a test, please?
Save the below in a file and call it ‘versioncheck.ps1’:

powershell.exe -NonInteractive -NoProfile -Command "Write-Output $PSVersionTable.PSVersion"

Then, attempt to run the script from within PowerShell, and let me know the results, please?

Thanks and Kind Regards,
Adam

Hi @adam.hollow

I’ve run the above without disabling Mcafee, I’m going to request the sys admin guys to do in the morning then re-run. For now still no output results

Hi @adam.hollow

So it seems that Mcafee was the issue, when we disabled it the installation flowed as normal.

Our IT security team are wanting to know if you able to provide us with the AV file path exclusions or executable exclusions?

This way they can add it on there side to our deployment servers.

Please advise

regards
T

Hi @tabrahams1,

That’s great that you were able to confirm McAfee as being the issue and also great you managed to set up your instance.

If you add the Octopus Home folder: C:\Octopus and the Octopus Install folder: C:\Program Files\Octopus Deploy to the exclusions this should be sufficient to allow Octopus to operate normally.

This should also cover Tentacle installs on machines also running McAfee.

Please let me know if there’s anything else we can do to help!

Kind Regards,
Adam

Hi @adam.hollow

The above should suffice for now.

I will log the above with our security team then test.

I will give and update once all is done:

Thanks again for the assistance

regards
T

1 Like