Installing windows services on Windows server 2012

Hey we have been using Octopusdeploy for ½ a year now and so far all have been working nice and easy!
But we got 2 new servers running Windows server 2012, and i have some trouble to get it to work.
The same service is deployed to other servers running Windows server 2003 (SP2) and 2008 where it Works fine.
The problem:

We have a Deploy.ps1 (base on the example found in the documentation) last thing it will do is:
Start-Service $ServiceName
On WS2012 i get an error (our service is called E247.CMS.Encode):
Service ‘E247.CMS.Encode (E247.CMS.Encode)’ cannot be started due to the following error: Cannot open E247.CMS.Encode service on computer ‘.’.
If i logon to the server and start powershell and run Start-Service E247.CMS.Encode i get the same error. If i start powershell elevated it works fine. After some reading it seems something have changes on WS2012 and the UAC will kick in if you try to start a service :frowning:

One suggestion i found was trying to elevate the start-service command.
Start-Process “$psHome\powershell.exe” -Verb Runas -ArgumentList ‘-command “Start-Service $ServiceName”’ | Write-Host
but the tentacle just hang with that command…

Of cause one solution is to disable the UAC but i don’t like that and should be a last resort.

Another solution (this i have not tried yet) is to use the scheduler, so you should be able to add a task to the scheduler that will start the service, and should be able to Schedule it to run elevated.

But this is a bit complicated solution imho, so before i start trying all this i was hoping to find a more easy solution here :wink:

Btw i’m not (yet) a guru in powershell so it might just be lack of knollage :wink:

/T

Hi,

Thanks for getting in touch.

What credentials is your Octopus Tentacle windows service running under? Is it a local admin or the Local System account?

Paul

Hey tx for writing. Yes I should have mentioned that, I’m running the tentacle as a domain user that are local admin. The reason for this is I’m installing some msi via octopus and it was needed to get msiexec to work.

/T

Hi,

Thanks for the update. In our next release we’ll add a manifest to request admin permissions, I hope this will solve the problem.

Paul

Sounds good, and I will post any discoveries if I manage to make a workaround.

/T

sounds like windows 2012 doesn’t work with octopus server still right? from the octopus website req: Windows Server 2008 or higher … maybe it should just say what it actually supports then?