Is there online Powershell interpreter available on the Internet? I mean like trypython for Python programming language.
3 Answers
Full disclosure: I am the owner of Try It Online.
TIO Nexus has a Powershell interpreter as of a few days ago. It uses Powershell v6.0.0-alpha.13, which is the latest release of Powershell for Linux.
I've re-enabled these aliases – which conflict with POSIX utilities of the same name on *nix – to make the online interpreter more similar to Powershell on Windows. Powershell Core has only the aliases the developers deem fit for *nix.

- 14,264
- 2
- 48
- 57
-
Let me restate after cleaning up my original comments: This looks very promising. I've dug deeper: PowerShell _Core_ when installed on _Windows_ (which is distinct from _Windows PowerShell_!) actually still has the Unix-like aliases, so the most accurate name would strictly be "PowerShell on
", in your case "PowerShell on Fedora" or "PowerShell on Fedora 24". This implies that it is a Core edition running on Linux (Fedora). That said, given that most people will install PowerShell _Core_ only on Unix platforms, perhaps "PowerShell Core" is best. – mklement0 Dec 11 '16 at 16:49 -
Note that this also means that your "PowerShell"-named service _with_ the Unix-like aliases effectively emulates _PowerShell [Core] on Windows_, which, as mentioned, is _not_ the same as _Windows PowerShell_: PowerShell Core runs on _.NET Core_ even on Windows, whereas Windows PowerShell "ships only on Windows and _requires the complete CLR_." – mklement0 Dec 11 '16 at 16:50
-
I therefore wonder if it is worth having a separate Core-plus-Unix-like-aliases service at all, given that PowerShell _Core_ users are likely to be looking for a _cross-platform_ experience, where the Unix-like aliases can't be counted on. (Another option: rename to "PowerShell Core (Windows aliases)".) I think it'll help PowerShell's cross-platform adoption in the long run to encourage people to make do without the legacy aliases named for Unix utilities (e.g., `ls`, `cat`) or "DOS" commands (e.g., `dir`, `type`), and instead only use PowerShell's "native" aliases such as `gci` and `gc`. – mklement0 Dec 11 '16 at 16:51
-
Re Linux vs. macOS: Fortunately, the [current version](https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/InitialSessionState.cs) of the linked file now uses the more accurate `#if !UNIX`, and the comment above states, "// Porting note: #if !UNIX is used to disable aliases for cmdlets which conflict with Linux / OS X" – mklement0 Dec 11 '16 at 16:51
-
Ah, I had renamed the interpreter ID on the client side, but not on the server. Thanks for catching that. Powershell Core should work now. Re PowerShell w/aliases: *Try It Online* started as an online interpreter for recreational programming languages and was used almost exclusively to verify answers on [Code Golf Stack Exchange](http://codegolf.stackexchange.com/). While the new incarnation of TIO has added (and is still adding) a variety of practical programming languages to appeal to a broader audience, the lion share of its user base are still code golfers. – Dennis Dec 11 '16 at 17:31
-
So while I want to provide the cross-platform experience, I also want to provide a version that is as similar to Windows Powershell as possible with Powershell on Linux. I realize the the extra aliases bridge only a tiny part of the gap, but they're used rather frequently on Code Golf, so a separate version is still worth it imo. – Dennis Dec 11 '16 at 17:31
-
Got it, thanks for letting me know. So perhaps something like "PowerShell (all aliases)" and "PowerShell Core" would work? And/or a note on the service-specific pages for clarification? – mklement0 Dec 11 '16 at 17:36
Not that I know of, but PowerShell 3.0 has an installable web-based console that is a component of Windows Server. Full intellisense, the works. Very similar to the try* series. Download v3 and try it yourself.

- 51,312
- 7
- 89
- 111
Tutorialspoint offer an online PowerShell interpreter (amongst dozens of other programming environments) on their CodingGround site.
In reality, it's not a true PowerShell interpreter but a PASH shell, which is the Mono adaptation of Microsoft's scripting tool. Still, the syntax and standard cmdlets should be the same. However, you'll find it lacks or has different environment variables and other implementation-specific elements.

- 493
- 1
- 8
- 8
-
Pash is quite a bit behind PowerShell, both in terms of the language and cmdlet support. – Joey Feb 08 '16 at 22:33
-
With the benefit of hindsight: now that [PowerShell itself is supported on Unix platforms via .NET Core](https://github.com/PowerShell/PowerShell), it's safe to assume that it will [supersede Pash](https://groups.google.com/forum/#!topic/pash-project/cFZx_XfRN28). – mklement0 Dec 10 '16 at 23:17