Hello,
I have a small question about executing custom commands remotely with powershell.
We are now using Adaxes custom commands through orchestrator with remote powershell, but when u execute a custom command like this u don't get any result/log. Is there any way to receive the logs for a command u have just executed in powershell?
Here is an example script we use...:
import-module ActiveDirectory
import-module Adaxes
[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")
$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("adaxes_server")
$command_example = "{e14bfad4-5234-4ec7-bcd3-ead9b8a9c7ee}"
$UserAD= Get-AdmUser User1 #### Reference user
$UserAD_DN = $UserAD.distinguishedName
$UserAD = $admService.OpenObject("Adaxes://$UserAD_DN", $NULL, $NULL, 0)
$UserAD.ExecuteCustomCommand($command_example)
Kr,
Serge