KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Cannot get 64 bit PS to run from ShellScript.

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Bug reports
View previous topic :: View next topic  
Author Message
stephan88



Joined: 05 Dec 2011
Posts: 2

PostPosted: Mon Dec 05, 2011 12:35 pm    Post subject: Cannot get 64 bit PS to run from ShellScript. Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12791
Location: USA

PostPosted: Mon Dec 05, 2011 3:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
stephan88



Joined: 05 Dec 2011
Posts: 2

PostPosted: Tue Dec 06, 2011 5:56 am    Post subject: Reply with quote

Thanks... that worked.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Bug reports All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index