S*******h 发帖数: 7021 | 1 We want to host a Web Service in an internet facing web server and push software updates to Windows and Linux machines from this Web Service. In the Windows environment,the Windows machine management tasks are typically done by Windows PowerShell with Windows Management Instrumentation(WMI) query.
In our initial analysis, we prefer to use Java and Apache Axis2 to implement this Web Service. The question comes to how to make Java execute PowerShell commands in the web service? If Java can’t do this, are there other alternatives that can make this web service perform OS configuration and machine management tasks for both Windows and Linux machines?
先谢过 | g*****g 发帖数: 34805 | 2 I don't know much about PowerShell. But as long as you can run the
thing as a script, it should be fine. A script can be ran by calling
Runtime.exec
software updates to Windows and Linux machines from this Web Service. In
the Windows environment,the Windows machine management tasks are typically
done by Windows PowerShell wi
implement this Web Service. The question comes to how to make Java execute
PowerShell commands in the web service? If Java can’t do this, are there
other alternatives that can make
【在 S*******h 的大作中提到】 : We want to host a Web Service in an internet facing web server and push software updates to Windows and Linux machines from this Web Service. In the Windows environment,the Windows machine management tasks are typically done by Windows PowerShell with Windows Management Instrumentation(WMI) query. : In our initial analysis, we prefer to use Java and Apache Axis2 to implement this Web Service. The question comes to how to make Java execute PowerShell commands in the web service? If Java can’t do this, are there other alternatives that can make this web service perform OS configuration and machine management tasks for both Windows and Linux machines? : 先谢过
| S*******h 发帖数: 7021 | 3 Yes, PowerShell can be run as a script.
To run PowerShell script, you need to install PowerShell 2.0 and, ideally,
use Putty Plink to SSH from Powershell.
I looked up the internet. It seems that PowerShell has a version for Apache
Linux server called PASH: http://blogs.msdn.com/b/powershell/archive/2008/04/08/powershell-on-linux-solaris-mac-etc.aspx
Does anyone ever execute PowerShell (PASH) from Java in Linux server? Does
it work fine?
execute
【在 g*****g 的大作中提到】 : I don't know much about PowerShell. But as long as you can run the : thing as a script, it should be fine. A script can be ran by calling : Runtime.exec : : software updates to Windows and Linux machines from this Web Service. In : the Windows environment,the Windows machine management tasks are typically : done by Windows PowerShell wi : implement this Web Service. The question comes to how to make Java execute : PowerShell commands in the web service? If Java can’t do this, are there : other alternatives that can make
| t*****s 发帖数: 124 | 4 execute PowerShell on Linux server?
PowerShell need .Net Framework support, so you need have a .Net Framework
environment on Linux server first, then implement PowerShell runtime on
Linux
Apache
【在 S*******h 的大作中提到】 : Yes, PowerShell can be run as a script. : To run PowerShell script, you need to install PowerShell 2.0 and, ideally, : use Putty Plink to SSH from Powershell. : I looked up the internet. It seems that PowerShell has a version for Apache : Linux server called PASH: http://blogs.msdn.com/b/powershell/archive/2008/04/08/powershell-on-linux-solaris-mac-etc.aspx : Does anyone ever execute PowerShell (PASH) from Java in Linux server? Does : it work fine? : : execute
| S*******h 发帖数: 7021 | 5 多谢指点
I searched internet and found a .NET Framework for non-MS platform called "Mono".
http://www.mono-project.com/Main_Page
Is this the .NET framework you talked about? So once I install Mono, I am able to run PowerShell script at Java Web Service via Java RunTime.exec?
【在 t*****s 的大作中提到】 : execute PowerShell on Linux server? : PowerShell need .Net Framework support, so you need have a .Net Framework : environment on Linux server first, then implement PowerShell runtime on : Linux : : Apache
| t*****s 发帖数: 124 | 6 see my reply to your message
"Mono".
able to run PowerShell script at Java Web Service via Java RunTime.exec?
【在 S*******h 的大作中提到】 : 多谢指点 : I searched internet and found a .NET Framework for non-MS platform called "Mono". : http://www.mono-project.com/Main_Page : Is this the .NET framework you talked about? So once I install Mono, I am able to run PowerShell script at Java Web Service via Java RunTime.exec?
| g*****g 发帖数: 34805 | 7 Don't count on Mono to run anything serious. Just write a shell
script on linux and be done with it.
"Mono".
able to run PowerShell script at Java Web Service via Java RunTime.exec?
【在 S*******h 的大作中提到】 : 多谢指点 : I searched internet and found a .NET Framework for non-MS platform called "Mono". : http://www.mono-project.com/Main_Page : Is this the .NET framework you talked about? So once I install Mono, I am able to run PowerShell script at Java Web Service via Java RunTime.exec?
|
|