WebAdministration Not Found in WebSite Deploy Server 2012 R2

Hi there,

So I have gone through all the support issues and I can’t solve the problem of getting WebAdministrator module to be defaulted into the context of the deployment of a website.

I can import the module just fine in Powershell ide and it will show up in the list, but when I run the get modules in the octopus task script console it doesn’t show up by default. I have changed the tentacle to use an elevated user account that has admin, the machine has the web server role with management script features, I have even tried turning of UAC. But I keep getting:

Import-Module : The specified module ‘WebAdministration’ was not loaded because no valid module file was found in any module directory.

The machine is 2012 R2 with Powershell 4 on it.

I see the module in: C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

Any help would be appreciated, thanks!

Adam

Hi Adam,

Thanks for reaching out.

  • What happens if you run Get-childitem C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ from the script console while the Tentacle is running under this admin account?

  • Just for the sake of testing: If you change the Tentacle service to run under your own user, are you able to import the module?

Thanks,
Dalmiro

Dalmiro,

My apologies, I just discovered what the issue was, perhaps you can explain to me the reason for the design decision.

When looking at the logs I assumed I was seeing errors coming from our web server, when in fact the deploy was trying to push the website to the application server right after the web sever.

The issue looks like how Octopus uses roles, my assumption was that the roles would act as an intersection (AND) when it is in fact a union (OR) of any targets in the list of roles.

If that is in the documentation my apologies, if not, then I can only suggest that it get in there, since I think that is not an intuitive use of the role feature.

All the best,
Adam