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
Recommended Answer
This property should include all that info.
$UAJob.ScriptFullPath

Adam Driscoll
PowerShell Expert and Developer at Devolutions
d8f121bff89ac68a2e3ce3bb1cbeac54cc27b88e.png
This property should include all that info.
$UAJob.ScriptFullPath

Adam Driscoll
PowerShell Expert and Developer at Devolutions
d8f121bff89ac68a2e3ce3bb1cbeac54cc27b88e.png
Thank you @Adam Driscoll! 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.
docs.powershelluniversal.com
Adam Driscoll
PowerShell Expert and Developer at Devolutions