Home > Forum > Actions > error when executing powershell script

error when executing powershell script
0

Hello, I want to create an AD contact using a powershell script.
If you execute the script on the server it works. Unfortunately it does not work in Webcon Designer Studio.
The error says: 'The method or process is not implemented'.

How can I solve this error?

In reply to: Daniel Krüger (Cosmo Consult)

Hi Celina,

based on the error I would say, that the Enter-PSSession is causing the issue.

Instead of creating a new session, you could pass the computer name and credentials to the invoke-command directly
Invoke-Command
[[-ComputerName] <String[]>]
[-Credential <PSCredential>]

Best regards,
Daniel

Hi Daniel,
Thank you - that worked!
Unfortunately, I still get a warning, but I can't figure out what the reason for this warning is...

The only message I get is: “Created with warnings”.
Can I possibly look in database logs or in any Webcon reports? I have not found anything so far

MVP
In reply to: Celina

Hi Daniel,
Thank you - that worked!
Unfortunately, I still get a warning, but I can't figure out what the reason for this warning is...

The only message I get is: “Created with warnings”.
Can I possibly look in database logs or in any Webcon reports? I have not found anything so far

Hi Celina,

it has been a long time that I've used PowerShell action and I have never used it to invoke a command on another server.

You could check, whether the write-output is still logged to the workflow history which would allow you to debug it:

https://daniels-notes.de/posts/2021/retrieve-ps-variable-value#powershell-script


Best regards,
Daniel

MVP
In reply to: Celina

Hi Daniel, I looked in the WFLogs table but unfortunately I didn't find any logs for the Powershellscript there

Hi Celina,

did you add any write-output statements like this one to see where it is failing?

"Write-Output "Connected to server"

Another Idea, did you check the action execution in the history in admin mode? The admin mode may show some additional information.

Btw. WEBCON has action to create users in the active directory. Maybe you don't even need the script.
https://docs.webcon.com/docs/2025R1/Studio/SystemSettings/GlobalParams/SystemSettings_ActiveDirectory#1-modifying-active-directory-objects-support-active



Best regards,
Daniel