PDA

View Full Version : Powershell script won't run on CommitCRM server


sam.otago
March 29th, 2020, 07:52 PM
We have a Powershell script that works fine when run from a client PC against the CommitCRM server, using UNC paths.
But when run directly on the server, either using UNC or local paths, we get "Status 2000: General Error Occurred FAILURE" at the init line.

Here's a snippet of the code:
------------------------------
add-type -Path "\\server\share\commitcrm\ThirdParty\API\CommitLib. dll"
$CommitConfig = New-Object CommitCRM.Config

$CommitConfig.AppName = "My Script"
$CommitConfig.CommitDllFolder = "\\server\share\commitcrm\ThirdParty\UserDev"
$CommitConfig.CommitDbFolder = "\\server\share\commitcrm\db"

[CommitCRM.Application]::Initialize($CommitConfig)
------------------------------

Support Team
March 30th, 2020, 06:03 AM
Thank you for posting this.

It is hard to tell what exactly the problem is. Please ZIP the \Logs folder and email it to us or share it with us using Dropbox/Drive etc. and we'll continue from there, after analyzing the logs in our lab.

sam.otago
March 30th, 2020, 01:45 PM
Thanks, I have e-mailed them through.

Support Team
March 31st, 2020, 06:20 AM
Thank you for sending the log files.

Here is the error that was logged:

Error 6080: Error loading the Advantage remote communication layer DLL. axServerConnect

This error indicates a communication problem with the Advantage Database Server and it means that the Advantage remote communication layer DLL(s) could not be loaded.

The suggested solution for this error is to put axcws32.dll somewhere in your client PC's/server search path (e.g., your \WINDOWS\SYSTEM directory).

Please give it a try and let us know whether it works.

sam.otago
March 31st, 2020, 02:38 PM
Thanks, that seemed to have worked.

Support Team
April 1st, 2020, 06:04 AM
Thank you for the update!