Do PowerShell scripts run under Mono?

ε祈祈猫儿з 提交于 2019-12-29 05:46:08

问题


Do PowerShell scripts run under Mono? I would like to run them on a Mac.


回答1:


There is an open source version of PowerShell called Pash designed for Mono. It is not complete, but may be able to do what you need:

http://pash.sourceforge.net/ (this project has not been active for quite some time)

Checkout the re-start at: Pash-Project on GitHub.




回答2:


Powershell has now been open-sourced and is available here.

As of right now it is V6.0 alpha. I've been running it on OS X for a lot of file operations and it has been working very well.

Note that you may need to install .Net Core to get Powershell to behave properly. Also note that system.management.automation.runspaces works right out of the box (for runspacepools).




回答3:


The powershell.exe stub is actually a native win32 program, not a managed assembly. It may be possible in the future to host the System.Management.Automation assembly in Mono, but I'm fairly sure it doesn't work at the moment.



来源:https://stackoverflow.com/questions/1083275/do-powershell-scripts-run-under-mono

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!