Pass the newly created user account to the Custom Powershell scripts

Pass the newly created user account to the Custom Powershell scripts

Hello,

I've created a Powershell script that run only on successful user creation. I need to pass the newly created username to this script in the command line using a variable. Is there a way I can pass the newly created user account values to my Powershell script? I've tried %USERNAME% but that it's not working. My script works perfectly when it's executed outside of ADManager but not when it's run by ADManager. I guess it's because I'm not using the right variable.

Thanks
              New to ADManager Plus?

                New to ADSelfService Plus?