Powershell Step erroring in PDQ Deploy but not in Powershell ISE
In a work environment, we have a piece of internal software which is updated periodically by our development team. When I deploy this software with PDQ Deploy, I want to be sure that I'm installing the newest version, so I copy it from the file server where it's saved, and replace the older executable saved on our PDQ Deploy server. So, my script looks something like this:
Copy-Item "\\fileserver01\apps\Player\Player*" -Destination "C:\PDQ Deploy\Repository\Player\PlayerInstaller.exe"
The script works perfectly when I run it with Powershell or Powershell ISE, but I am getting an error when I use it as a Powershell Step in PDQ Deploy. This is the only thing in the Outpug Log:
At C:\Windows\AdminArsenal\PDQDeployRunner\service-1\exec\Error Handling Wrapper.ps1:58 char:2
+ Throw $_.Exception.ErrorRecord
+ CategoryInfo : OperationStopped: (:) , RuntimeException
+ FullyQualifiedErrorId : ScriptHalted
Right now, PDQ's command line for this step is %systemroot%\System32\WindowsPowerShell\V1.0\PowerShell.exe -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass
Has anyone seen this? I've double-checked the deployment credentials, and it still fails while running under my personal account. Googling makes it seem like it may be a problem with the command line parameters that PDQ Deploy defaults to, but I've tinkered with the parameters there and it doesn't seem to make a difference.
Also wanted to add that when I click on "More Info" it just gives me "PowerShell script returned error code 1"
The weird thing is that there is no C:\Windows\AdminArsenal\PDQDeployRunner\service-1\exec\Error Handling Wrapper.ps1 on my machine. All I have is C:\Windows\AdminArsenal\PDQDeployRunner containing Service.Log but no \service-1\ folder
I believe those folders and files in C:\Windows\AdminArsenal\PDQDeployRunner are temporary while the deployment is running, and usually get removed as it completes.
So that's probably why you don't see that .ps1 file there now.
You could confirm by watching that folder during a deployment. (I just did to confirm)
That doesn't explain the error, just why the file is not there now.
You may want to include "-Confirm:false" in your code or just use the built-in file copy in PDQ-Deploy.
I've ran into a similar error when including steps that have powershell in packages. Unfortunately, the error you're receiving is just a very general base line error returned by powershell that does not describe the problem very much. Attempt to change the deploy user settings to interactive or as logged on user. If these don't work you might rethink your plan. I don't see all that much value in copying an already up-to-date package from the \\fileserver01\ to your local machine. When you're on a console machine it should cascade down the updated player and be ready to deploy.
Please sign in to leave a comment.