We created a custom Powershell script to populate certain AD fields like Manager, Job title and others after the user account is created in ManageEngine ADMP, but i can't get the script to work successfully.
We use templates to create accounts and we need to pass the employeeID value into the Powershell script. The script will cross-check the employeeID with a csv file (downloaded from our HRIS system), retrieve the required information and update AD. When we create the account, we get a message that the custom script is running in the background but nothing happens.
By the way, the script works well when running it outside ManageEngine.
I tried running the custom script via ME and adding a parameter on the script as follow but none of them worked.
PowerShell -file "C:\Program Files\ManageEngine\ADManager Plus\bin\WorkdaySync_ME.ps1" -employeeID %ad.employeeID%
param (
[string]$employeeID
)
----------------------------
PowerShell -file "C:\Program Files\ManageEngine\ADManager Plus\bin\WorkdaySync_ME.ps1" %ad.employeeID%
param (
[string]$employeeID
)
------------------------
PowerShell -file "C:\Program Files\ManageEngine\ADManager Plus\bin\WorkdaySync_ME.ps1" -arg1 %ad.employeeID%
param ($arg1)
$employeeID = $arg1
-----------------------
PowerShell -file "C:\Program Files\ManageEngine\ADManager Plus\bin\WorkdaySync_ME.ps1" %employeeID%
param (
[string]$employeeID
)
$newEmployeeID = $employeeID
I checked the forum for any solution but could not find any. I'd appreciate your help on this.