Executing powershell script on endpoints

Executing powershell script on endpoints

I have a .ps1 script that searching the computer registry and is it finds a value in the case SecureCRT uninstall MSI string it then runs via PS invoking CMD to run the MIS part. I have tested the script on a few machines by running the .ps1 script on the machine and does exactly what I need it to.

If I create a configuration and use Custom Script option on a test machine and I see the CMD window pop up on the test machine and close straight away and the software does not get removed.

I just add the script to the repository, create the config>custom script and add the script (ps1) to this config. Is it possible that I am missing a step somewhere?

I guess I am missing something here but cannot figure this out, anyone able to help on this at all?

Many thanks,

                  New to ADSelfService Plus?