Showing results for 
Search instead for 
Did you mean: 

PowerShell Script failing to run

Novitiate I

Hello All

Just hoping someone may be able to help on this script I'm running. Ive got a script to run an MSI installer and I am trying to add the before the MSI runs, Ive tested the lines below and it works in my test environment but when loading into 'Commands' in JumpCloud the entire script fails to run.

Any ideas where I may be going wrong?



Add-Type -AssemblyName PresentationFramework
[System.Windows.MessageBox]::Show('Click Yes to proceed with Installation', 'Confirmation', 'YesNo');






Novitiate II

hi, I don't have a clear background info so idk if this reply fits to your question please elaborate. Anyways I think we have a similar problem. i also use "[System.Windows.MessageBox]" it works on local machine but every time i run this in jumpcloud nothing shows.

now i change it to " 
(New-Object -ComObject WScript.Shell).Popup "  intead of using

here is the code for prompt msg:

        # Prompt the user to confirm or abort shutdown # Display message box
        $confirmation = (New-Object -ComObject WScript.Shell).Popup("If you see this and don't want to shut down the PC, just click OK.", 0, "Shutdown Cancellation", 1)

hope it helps