Sometimes the %variables% pass to the script and sometimes they do not.

Sometimes the %variables% pass to the script and sometimes they do not.

Sometimes the %variables% pass to the script and sometimes they do not

  1. powershell -File "C:\ManageEngine\ADManager Plus\script.ps1" -displayName "%displayName%" -sAMAccountName "%sAMAccountName%" -mail "%mail%" -ipPhone "%ipPhone%" -mobile "%mobile%" -title "%title%"

Are inconsistently being passed as arguments for my script which calls for the parameters as follows

Param([Parameter(Mandatory=$true)][string]$displayName,[Parameter(Mandatory=$true)][string]$sAMAccountName,[Parameter(Mandatory=$true)][string]$mail,[Parameter(Mandatory=$true)][string]$ipPhone,[Parameter(Mandatory=$true)][string]$mobile,[Parameter(Mandatory=$true)][string]$title)            

Sometimes they work sometimes they don't it's inconsistent. If I run the script from powershell it works fine, but the %variables% themselves periodically aren't being binding and powershell errors saying that 

" Cannot bind argument to parameter 'title' because it is an empty string."

Which would imply that it's not receiving anything from the title field even though the title field is filled in. Inconsistently if I click on the title field in my template it seems to make ADMP "recognize" that there's something in the field, and then the variables have a tendency to pass through properly, but not always.

                New to ADManager Plus?

                  New to ADSelfService Plus?