Deploy fails with PSSecurityException on PowerShell script

(Del Lamb) #1

Octopus Server Version 3.3.2

We are deploying updates to a 3rd-party tool called Qlik. We used Octopus to deploy a NuGet package with all the files to the Qlik folders, then use a PowerShell script to run a deployment program that uses the Qlik API to install the files. This PowerShell script is failing in one of our environments. The script never even starts as there is a security issue preventing the execution. It works in 10 other environments, so it seems to be some specific to this environment. There are no errors in the Server or Tentacle logs.

We have tried setting the Execution Policy on the deployment server to Unrestricted, and verifying all the permissions. Some security issue is preventing the execution of the PowerShell script and thus preventing the deployment.

Here is the error from the Task log:

                |     Warning: WHQOCNOPS_FDC-SQLProject

11:23:13 Verbose | Octopus Server version: 3.3.2+Branch.master.Sha.ba2859229aae7aaca25a803313513ec7e3f4178a
11:23:13 Info | Deploying package ‘E:\Octopus\Files\Qlik.RMClient.Extract.1.0.57.nupkg-6cb645b9-3ffb-44f4-b043-c2e1ee217993’ to machine ‘poll://grsfhlbrufv4jkmpmnhz/’
11:23:14 Verbose | Octopus Deploy: Calamari version 3.3.1+Branch.master.Sha.25c4524418a3a9922cde6da7ebf074dba37ea326
11:23:14 Info | Deploying package: E:\Octopus\Files\Qlik.RMClient.Extract.1.0.57.nupkg-6cb645b9-3ffb-44f4-b043-c2e1ee217993
11:23:15 Verbose | Extracting package to: E:\Octopus\Applications\VCAC_FDC- SQLProject\Qlik.RMClient.Extract\1.0.57
11:23:15 Verbose | Extracted 6 files
11:23:15 Info | Purging the directory ‘\Corp\Dfs1\Ent\Qlik\Migration\Qlik.RMClient.Extract’
11:23:15 Info | Copying package contents to ‘\Corp\Dfs1\Ent\Qlik\Migration\Qlik.RMClient.Extract’
11:23:15 Info | Copied 6 files
11:23:15 Verbose | Executing ‘\Corp\Dfs1\Ent\Qlik\Migration\Qlik.RMClient.Extract\Octopus.Action.CustomScripts.PostDeploy.ps1’
11:23:16 Error | . : AuthorizationManager check failed.
11:23:16 Error | At line:1 char:6
11:23:16 Error | + . {. '\Corp\Dfs1\Ent\Qlik\Migration\Qlik.RMClient.Extract\Bootstrap.Octopus.Act …
11:23:16 Error | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11:23:16 Error | + CategoryInfo : SecurityError: (:slight_smile: [], PSSecurityException
11:23:16 Error | + FullyQualifiedErrorId : UnauthorizedAccess
11:23:16 Verbose | Adding journal entry:
11:23:16 Verbose |

Any help in solving this issue would be appreciated.

Del -


Hi @Dellamb

Thanks for getting in touch!

Having a bit of a look around it seems like you have run into an issue that is very similar to this, where powershell thinks that this location is untrusted. Hopefully that helps, please let me know if you are still having problems.


(Del Lamb) #4


Thanks for taking the time to look at this. I’ve forwarded this to our infrastructure team for their investigation.

Del -

(Del Lamb) #5


That information was very helpful. It was indeed a group policy change that solved this issue. Thanks for your help.

Del -


HI @Dellamb

No problems, glad your were able to get it sorted.

Let me know if there is anything else we can help with!


(system) #7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.