I have a business rule script that dot-sources an external PowerShell function file:
. \\server\path\functions.ps1
Within the external functions.ps1 file, I have a function that attempts to use Adaxes value references like %firstname%
and %lastname%
to build email addresses or other values based on user properties.
Problem: The value references are not being resolved when used within functions defined in the external file. Instead of getting the actual user values, the function returns literal strings like %firstname%.%lastname%@domain.tld.
Question:
Do Adaxes value references (e.g., %firstname%, %lastname%) work within functions that are defined in external PowerShell files and then dot-sourced into business rule scripts?
I've tried:
- Single percentage signs:
%firstname%
- Double percentage signs:
%%firstname%%
Neither approach resolves to the actual user values.
Current Workaround: If this functionality is not supported, I can modify my approach to pass the actual values directly to the function as parameters instead of relying on value references within the external function.
Could you please clarify whether this is expected behavior or if there's a supported way to use Adaxes value references within dot-sourced external functions?