Retrieve Script/Job Name & Folder Path

Is there a variable to pull the current script name & folder path that it resides in?
I am sending an email on completion of a job, would be nice to include that so that can assist a user who may have a question or request a rerun.

I tried $UAScript - but that did not return anything and the $UAJob did not seem to have a name property.

Product: PowerShell Universal
Version: 5.0.0 RC5 & 4.3.3

This property should include all that info.

$UAJob.ScriptFullPath

1 Like

Thank you @adam! I overlooked it in the documentation.

No worries! I actually added this earlier this week, I think, because someone else was also curious. Here’s the whole structure.

1 Like