How to get invoke-PSU to prompt for variable input

Hi Team

Hoping someone can help me out here, very much a NOOB with PSU but really loving how this could be used for our automation, Im trying to trigger/invoke a script i have written in PSU, and the script itself is working perfectly when manually run in PSU and it prompts me for input on the required variables. and then completes it successfully.

The problem lies in when I try to invoke this script from a dashboard i don’t get prompted to enter the variables it simply executes. i am triggering this script from a button with the below code

New-UDButton -Text ‘Test Connection to Tenancy’ -Color primary -OnClick { Invoke-PSUScript -Name TestConnectionToTenanciesViaSAM.ps1 }

It triggers the script without fail, but doesn’t prompt for input

is it even possible to trigger a script and have it prompt for the variable input?

Thanks in advance


When you say variable input, do you mean parameters to the script or values that you enter as the script is running (Read-Host)?

Hi Adam

I managed to solve this. just getting me head around the syntax of the UD cmdlets slowly


1 Like