Do PowerShell scripts run under Mono? I would like to run them on a Mac.
3 Answers
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.

- 3,857
- 1
- 27
- 28

- 9,982
- 1
- 29
- 33
-
1Very probably not. Pash is unfortunately (a) very incomplete and (b) hasn't seen any activity for about a year. – Joey Jul 05 '09 at 09:28
-
One of the the ubuntu pash team has just been accepted to do a GSOC on it. – Bob Blanchett Jul 26 '09 at 14:12
-
@LexLi: That looks like the result of using Reflector on the real PowerShell. I think it's illegal, and I recommend people ignore it. However, the real Pash (based on Igor's work) is back under development. See https://github.com/Pash-Project/Pash/ – Jay Bazuzi Mar 28 '13 at 00:43
-
@JayBazuzi, yep, I think the author of that project has admitted that somewhere (on Mono mail list I think). So I removed my comment to avoid side effects of that project. – Lex Li Mar 28 '13 at 06:48
-
@LexLi: To be honest I really liked the project you linked too, and now I cant find it anymore. Perhaps it is not as illegal as you may think, since MS has [licensed Powershell 2](http://blogs.msdn.com/b/powershell/archive/2011/04/16/powershell-language-now-licensed-under-the-community-promise.aspx) under its [Community Promise](http://en.wikipedia.org/wiki/Microsoft_Open_Specification_Promise). This also means that the whole [Language Specification is avaliable](http://www.microsoft.com/en-us/download/confirmation.aspx?id=9706). – schletti2000 Aug 09 '13 at 13:00
-
1@schletti2000, I deleted the link for good, so don't ask about it any more. Thanks, and let's forget about it completely, like it never exists. If you do have experience with Microsoft's Community Promise, you should know that Microsoft only allows you to clone it (use your own code), but not decompile the binaries from Microsoft. That's why I removed the link to the illegal one. Let's hope the open source community can finally enhance pash further and further. – Lex Li Aug 13 '13 at 03:16
-
Currently there is a "fork" of PASH in Github, because the first programmer discontinued his work: https://github.com/Pash-Project/Pash – castarco Oct 28 '14 at 11:29
-
1See @Jeremy's answer - Microsoft has released this. – James Moore Mar 30 '17 at 23:32
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).

- 243
- 2
- 10
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.

- 29,755
- 14
- 88
- 113

- 51,312
- 7
- 89
- 111
-
Plus the PS commands reference lots of Windows API's so it would not be a simple port to, say, wine to run in Linux – Russell Jun 06 '11 at 11:47