Powershell process - Variables from ADSacount

Hi,

we have the 1IM 8.2. I´m building a Process where a PowerShell fires something. I use the "PowershellComponentNet4 - ExecuteScript" and I have no idea how to send, for example the Distinguished name to this script. I´m looking since hours but don´t find anything :(

Also, is there any option to specify if i can runt this script as admin?

Sampel script which don´t work:

Value = "
import-module activedirectory <- Insufficent rights
echo $error[0] > c:\temp\error.txt
Add-ADGroupMember -Identity user_prov_1 -Members DistinguishedName # <- How to get this from IAM?
"

Best Regards,

Denny

Parents
  • Hi, you should use a variable instead of directly pointing to DistinguishedName OR you should use a query which returns a Distinguished name. This depends on a source table for which your process generated.

    Here is the sample of indication of e-mail address for a process step with source table PersonInOrg:

    $FK(UID_Person).DefaultEmailAddress$

    If your process based on a source table ADSAccount, then in your case variable should be: 

    Add-ADGroupMember -Identity user_prov_1 -Members $DistinguishedName$ # <- How to get this from IAM?

Reply
  • Hi, you should use a variable instead of directly pointing to DistinguishedName OR you should use a query which returns a Distinguished name. This depends on a source table for which your process generated.

    Here is the sample of indication of e-mail address for a process step with source table PersonInOrg:

    $FK(UID_Person).DefaultEmailAddress$

    If your process based on a source table ADSAccount, then in your case variable should be: 

    Add-ADGroupMember -Identity user_prov_1 -Members $DistinguishedName$ # <- How to get this from IAM?

Children
No Data