If it’s a bash script, then you would need to copy and execute it on the target system (central execution) or the script would already need to exist on the target (remote execution)
How do I centrally execute an .sh script from a Windows app server?
You copy it and nexec it. or use scriptutil.
Thanks, I used below and it worked:
scriptutil -h ??TARGET.HOST?? -s //path/script.sh
The same method doesn't seem to work for powershell scripts. Can I perform central execution with .ps1 or I need to use a wrapper, copy it and then use nexec?
For powershell you need a wrapper to copy and nexec