PowerShell is not detected in Server Core

Hi Harry,

Thanks for reaching out. I want to confirm first if you are running your server under as Core or not. Could you please run the below command and let me know if it returns True or False ?

(Test-Path "$env:windir\explorer.exe")

If you are in fact running under Server Core, I’m afraid I have bad news for you as we don’t support that server flavor. This is also explained in our documentation: http://docs.octopusdeploy.com/display/OD/Installing+Octopus

Regards,
Dalmiro

Hello,

That’s funny because it was working fine a few days ago, just wanted to add another project to the deploy list and it threw the error mentioned.

I’ve tried to run that code in command but it says

‘Test-Path’ is not recognized as an internal or external command,
operable program or batch file.

Regards,

Harry

Hi Harry,

You are getting that error because you are trying to run that Powershell snippet from a regular command prompt. You need to run it from Powershell, which will recognize the test-path cmdlet.

Thanks,
Dalmiro

I’m running Octopus on Windows Server 2012 R2 Core for many years now, an older version though.

Ok, ran in powershell and it returned True

Hi @Hyder,

Hmm with that Powershell line I was hoping to see if you were running a core version or not, but apparently its not 100% accurate. In your case it returned true, which supposedly means you are not running a core version. Apologies for misleading you on that one.

I’m also sorry to say that, as mentioned before, Server Core is not in our list of supported OSs. So even though we’ve heard of users that were able to make it work (like Alexander here), we cannot provide reliable support for this OS version as its not part of our test battery.

Sorry for the bad news. Hopefully one of the users in this thread that were able to make it work can give you a hand with it.

Best regards,
Dalmiro

Just to say I had this issue on a server, and it turned out the installation of Powershell itself was dodgy.

The (Test-Path "$env:windir\explorer.exe") command returned an error saying Test-Path was not a recognised command (inside Powershell).

It turns out that C:\Windows\system32\WindowsP‌​owerShell\v1.0\Modul‌​es was no longer in the $env:psmodulepath environment variable. I don’t know why as it was a pretty new server instance.