Simple question in the title.
I'm not (yet) advocating to any side. Maybe after reading some well formuled thoughts.
Simple question in the title.
I'm not (yet) advocating to any side. Maybe after reading some well formuled thoughts.
Any shell that can be installed and run on *nix systems is on topic here as long as it is being run on *nix. So, "how can I use PowerShell to do foo on Linux?" is fine since PowerShell is actually available for Linux. See PowerShell is open sourced and is available on Linux and Installing PowerShell on Linux.
So if people are using this on *nix, then their questions should be on topic here. And if someone is asking a general "how can I do this" question, then an answer using PowerShell should be fine, as long as the answer would actually work on a *nix system and isn't depending on any Windows-specific resources.
Additionally, we have decided that WSL is on topic and I would imagine WSL users are even more likely to use PowerShell (I guess). With all this in mind, I don't really see any reason to make PowerShell off topic. It's a shell that can be used on *nix, so how is it different to any other non-standard shell like fish
or zsh
or anything else?
Finally, note that this site isn't dedicated to free/libre software. UNIX is very much non-free and a lot of our content and scope is about that. The fact that something is owned by a private company is not a relevant piece of information when deciding if it is on topic here. Nor is whether or not something is open sourced or free software. Yes, most of us here have a strong liking for the free software movement but it isn't an integral part of what this site does.
So, I vote for allowing PowerShell as long as it is being used on a *nix system, just like we do for any other tool.
Get-ChildItem
in a script running on Linux but not in that same script running natively under Windows?
Many questions about scripting or programming are on-topic for U&L, especially if they're relatively simple text- or data-processing tasks. Commonly shell, sed, awk, Perl and Python. C, C++, Java, and many others too...but any except the simplest questions get referred to Stack Overflow - as would many Perl or Python questions (like writing a web app in Mojolicious or Django)
Powershell is only available for one unix-like system (Linux), is well-suited to Windows scripting tasks, but not well-suited to *nix scripting tasks, nor is it a language that many here will have much expertise in[1]. *nix systems can run .BAT or .CMD scripts with command.com
or cmd.exe
via DOS emulators or WINE, but that doesn't mean questions about batch-file scripting are appropriate for U&L.
Powershell questions are, IMO, more appropriate for https://superuser.com/ or perhaps https://stackoverflow.com/ (or in rare instances, https://serverfault.com/). And Powershell questions will get better answers on those sites because there are more people on them who use it regularly.
[1] I predict that the most common answer to any "How do I do X in powershell" questions will be "Why are you using powershell for that? Use bash/zsh/awk/sed/grep/perl/python instead". And then it will turn out that the OP isn't even using any kind of *nix, they're using Windows. We already get lots of questions from people trying to do things in bash that they should use a text-processing tool or language for, but at least they're on-topic because they're doing it on some kind of *nix or using *nix tools.
The question initially mentioned only Powershell answers, not questions. I'm not sure if that's what was meant, but I see a distinction there.
I can't see why questions about Powershell on Unix-likes would be off-topic. Then again, I have no idea if anyone here has any expertise in answering them, so anyone asking about Powershell in general might get better answers on superuser.com or where-ever.
Answers using Powershell to general questions about how to do something on Unix-likes, without specifying any tools, would also seem to be equally on-topic exactly the same way answers using e.g. Ruby would be. That said, I might consider downvoting them because most Unix-likes probably don't have Powershell, giving such answers a rather limited usefulness.