I am trying to run another script after a scheduled job finishes. I used
Invoke-UDScript -Script 'myScript.ps1'
Output is showing unauthorized. According to the documentation I should not need to use an app token in this case? Maybe someone can help me out, I can generate a token but would rather not have to renew it every year.
Call Scripts from Scripts
You can also call UA scripts from UA scripts. When running a job in UA, you don’t need to define an app token or the computer name manually. These will be defined for you. You can just call
Invoke-UAScriptwithin your script to start another script. Both jobs will be shown in the UI. If you want to wait for the script to finish, use
Product: PowerShell Universal Version: 2.2.0