Let me add an additional advice....
You should NOT hardcode the script in the workflow - if you do so you have to have an ISIM administrator to maintain this (and it will need to be maintained from my experience...). Instead create some custom service attributes/custom service tab (extend the service schema and add these to the service form) and put the script there and then retrieve the script from there when you need it.
This way you can make externalize the maintenance of the actual script to the service owner or whoever is maintaining it - not need to have people fiddling around in the workflow editor...
Original Message:
Sent: Wed February 22, 2023 09:41 AM
From: Jose Luis Peñalver Paret
Subject: Postexec operation in Active Directory Adapter
Hi!
Yes, it is very helpful, thanks a lot.
We have ISIM 6.0. I have never used postexec, but now that I know it can work for our target, I intend to follow this guide (and your instructions):
https://www.ibm.com/support/pages/system/files/support/swg/sectech.nsf/0/852577ca0009093385257ac2006bfc63/$FILE/ITIM%20Active%20Directory%20Pre%20and%20POST%20exec%20setup%20and%20config.pdf
------------------------------
Jose Luis Peñalver Paret
Original Message:
Sent: Wed February 22, 2023 03:02 AM
From: Fractal Banana
Subject: Postexec operation in Active Directory Adapter
Hi Jose.
I had similiar case. Just pass userid (or whatever attribute you need) to PS script that you call in postexec.
I will assume you are fimiliar how postexec works and that you use ISIM. For IGI is a bit different.
So, add postexec attribute value to account you are creating before create operation in operational workflow.
I have it in script node just before create node.
Snipet from script node in workflow:
// set value for postexec
acc.setProperty("postexec", "c:\\ad_adapter_exec\\postexec_test.ps1 " + '"EZ.' + eruid +'"');
Esentialy, sets postexec value to execute postexec_test.ps1 with some $args.
Result will be something like this:
powershell.exe -executionpolicy remotesigned -File c:\\ad_adapter_exec\\postexec_test.ps1 EZ.NhesterC
Then you need to handle that attribute in PS script, and use it as user for home directory creation.
I used param further down in PS script.
param(
[Parameter(Mandatory=$true)][string]$account
)
Simple! :D
Hope it helps.
------------------------------
FractalBanana
Original Message:
Sent: Tue February 21, 2023 08:51 AM
From: Jose Luis Peñalver Paret
Subject: Postexec operation in Active Directory Adapter
Hi, I want to run a Powershell script after a new user with AD account is created. The script will basically retrieve an attribute from the AD for this user, homeDirectory, and create a folder there.
The problem is the script needs to know the user. Is there a way to pass a parameter to the Postexec script?
Thanks in advance.
Jose.
------------------------------
Jose Luis Peñalver Paret
------------------------------