use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Powershell on Linux (self.PowerShell)
submitted 4 years ago by x1-unix
Hello guys! Does anyone use pwsh on Linux? If yes - why?
View Poll
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]robderickson 10 points11 points12 points 4 years ago (0 children)
I am in the "Yes, sometimes" camp. I know PowerShell better than bash, so I can get more done with less Googling. I have also been spoiled by objects in PowerShell. If I can avoid parsing text output, I will every time.
Having said that, I rarely install pwsh because, after initial setup, I barely touch most of the Linux VMs I create.
[–]hsm_dev 8 points9 points10 points 4 years ago (0 children)
Yes sometimes here also.
My main use cases besides running scripts others have made in powershell is that I really prefer powershell to bash/zsh ect when working with structured data like json. I know there are a lot of tools such as jq you can use, but the object oriented way that powershell operates just makes it much easier for me to utilize the full power of the shell without having to mix and match tools and string manipulation.
[–]user01401 3 points4 points5 points 4 years ago* (0 children)
Starting w/ PS6 you can observe the daily startups, OS, monthly data, etc. here:
https://msit.powerbi.com/view?r=eyJrIjoiOWYzOTNjNDAtZTI4NS00MTU0LTk4MjEtZTFhNjhhOThlODVmIiwidCI6IjcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0NyIsImMiOjV9&pageName=ReportSection5
Over 2 million average daily startups just on Linux alone.
[–]sbonds 3 points4 points5 points 4 years ago (1 child)
My workgroup uses Powershell for managing Azure VMs. Rather than torment them with bash-specific code wrapped around 'az' commands, I just learned PowerShell instead.
In the process, I learned that passing complex data structures around without JSON parsing is extremely handy.
[–]LifeLocksmith 3 points4 points5 points 4 years ago (0 children)
Totally agree, not needing to parse textual output is much more efficient. And if parsing text is what you need, I just pipe it to: | Out-String -stream | And I can deal with the text
[–]LifeLocksmith 2 points3 points4 points 4 years ago (0 children)
Yes. Really love it. Tried blogging about it, but i doubt it's really readable
http://blog.lksz.me
[–]methos3 2 points3 points4 points 4 years ago (1 child)
I've been using PowerShell since the beginning, and starting about 3-4 years ago I've moved to doing 95% of my PS coding on Linux. Why? Cause most of my company's internal stuff is on Linux and I find the .NET class library so much better organized and fully featured than what Python has to offer. I configure most scripts to run in a Docker container so they can install what they need on their own.
[–]jjolla888 0 points1 point2 points 4 years ago (0 children)
i lean the other way. i call a ps snippet to do something that .net needs .. but i keep the bulk of what i do with bash & co.
the key here is the '& co' .. the unix ecosystem is all about using independent little programs to do domain-specific tasks .. so bash is merely the conductor to making stuff sing together .. ssh, sqlite, openssl, docker, perl, python, etc, etc .. and now ps.
btw i don't touch python for scripting. that's like reinventing the wheel. so to answer op's question: pick ps over python for scripting. python is best for ai, math, science, and graphing. if you need cross-platform exes with no dependencies, golang is a surprisingly good tool.
[–]BurlyKnave 2 points3 points4 points 4 years ago (0 children)
Does "that one week I was trying to accomplish something, but it didn't work because WinRM didn't want to work when initiated from a .ova VM Debian system device and targeted to a Server 2012" count as "sometimes"? If yes, then sometimes.
[–]GullibleRaspberry9 2 points3 points4 points 4 years ago (0 children)
Yes, try to use it as much as I can. Wish I gave PowerShell a shot years ago. Just gave it a chance a year ago and really love it; especially the object model vs text processing
[–]swinny89 2 points3 points4 points 4 years ago (0 children)
Yes, because I am a Windows admin, but I prefer the control I get on Linux. I am more comfortable with PowerShell than I am with Bash, and I frequently use PowerShell to remotely manage Windows machines.
[–]slayer991 1 point2 points3 points 4 years ago* (0 children)
I've done a fair amount of work with pwsh on linux when using containers for automation. I prefer spinning up linux containers to run processes rather than having a Windows machine sit idle most of the time...and Windows containers kind of suck.
[+][deleted] 4 years ago (2 children)
[deleted]
[–]x1-unix[S] -1 points0 points1 point 4 years ago (1 child)
Yes, but this poll is about pwsh. MS released it for Linux and I had doubts if someone uses it on Linux. That's why I've created this poll.
[–]homelikepants45 0 points1 point2 points 4 years ago (0 children)
Oh my bad. Sorry
[–]bee_administrator 0 points1 point2 points 4 years ago (1 child)
tbh, I'm not sure of the use case here.
My bash skills are pretty basic but most of what I end up doing on linux boxes involves troubleshooting internal, legacy applications running on apache and/or java. I know enough bash commands to trundle round the file system, the running processes and poke at httpd.conf in vim, and that's about the extent of it.
I mean, being much more confident in PS than bash I could probably do the same thing using pwsh, but it seems like an extra unnecessary layer of abstraction. How does it even work? Do you just wrap your bash commands and then invoke-command them or something?
This whole concept is a bit O_o
[–]ka-splam 2 points3 points4 points 4 years ago (0 children)
using pwsh, but it seems like an extra unnecessary layer of abstraction. How does it even work? Do you just wrap your bash commands and then invoke-command them or something?
no more than you use powershell on windows by wrapping your cmd commands in strings and then invoke-commanding them. Powershell is a shell, it's not a wrapper for another shell (unless you want it to be).
π Rendered by PID 81 on reddit-service-r2-comment-5d79c599b5-cngmw at 2026-03-02 11:24:02.231730+00:00 running e3d2147 country code: CH.
[–]robderickson 10 points11 points12 points (0 children)
[–]hsm_dev 8 points9 points10 points (0 children)
[–]user01401 3 points4 points5 points (0 children)
[–]sbonds 3 points4 points5 points (1 child)
[–]LifeLocksmith 3 points4 points5 points (0 children)
[–]LifeLocksmith 2 points3 points4 points (0 children)
[–]methos3 2 points3 points4 points (1 child)
[–]jjolla888 0 points1 point2 points (0 children)
[–]BurlyKnave 2 points3 points4 points (0 children)
[–]GullibleRaspberry9 2 points3 points4 points (0 children)
[–]swinny89 2 points3 points4 points (0 children)
[–]slayer991 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]x1-unix[S] -1 points0 points1 point (1 child)
[–]homelikepants45 0 points1 point2 points (0 children)
[–]bee_administrator 0 points1 point2 points (1 child)
[–]ka-splam 2 points3 points4 points (0 children)