View previous topic :: View next topic |
Author |
Message |
stephan88
Joined: 05 Dec 2011 Posts: 2
|
Posted: Mon Dec 05, 2011 12:35 pm Post subject: Cannot get 64 bit PS to run from ShellScript. |
|
|
Running from a RMA Active Agent (4.12) on Win2k8r2 I want to execute a 64 bit powershell (to use modules not available in the 32 bit version of PS):
So instead of calling (from HM 8.82):
powershell %schript% %params%
(which glues the .PS1 extension to the scriptname OK)
I have to call it like this:
c:\windows\sysnative\windowspowershell\v1.0\powershell.exe -file %Script% %Params%
Now HM stops adding the required .PS1 extension to the script and creates the scriptname ending in .BAT which give me the error:
error: invalid result (Processing file '....\temp\xxx.bat' failed because the file does not have a '.ps1' extension. Specify a valid powershell file script name and try again.)
Can I somehow manipulate what extension is given to the script in Hostmonitor ? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12806 Location: USA
|
Posted: Mon Dec 05, 2011 3:03 pm Post subject: |
|
|
If you copy powershell.exe to some other location or create link to it, everything should work fine.
E.g. if you link powershell and specify command line like
c:\win64tools\powershell.exe -file %Script% %Params%
it will work fine
Regards
Alex |
|
Back to top |
|
|
stephan88
Joined: 05 Dec 2011 Posts: 2
|
Posted: Tue Dec 06, 2011 5:56 am Post subject: |
|
|
Thanks... that worked. |
|
Back to top |
|
|
|