4 ms·
As a mac user, I was going to provide a flippant answer, but I decided to look into it instead. Personally, I use zsh or a custom built shell scripting library
by cobbal 4y ago
As a mac user, I was going to provide a flippant answer, but I decided to look into it instead. Personally, I use zsh or a custom built shell scripting library inside swift. Always like to see improvements to shells though. Googled for it and got a dozen guides on how to install it in mac, but none that actually explained how to use it. (One video result looked like it might have some info, but to me that doesn't count as documentation). All the documentation on powershell is targeted at windows devs, and it's just a very different culture.
Flippant answer: the CapitalizationConvention-ShouldScare-EveryoneAway
- code_runner 4y agoImo your flippant answer is bang on
- nojito 4y agoYou really don’t need any online documentation. Just use Get-Help and you’re off to the races.
- CWuestefeld 4y agoThis, in conjunction with the cmdlets and their parameters being something approximating English, with semi-standard verbs, makes things a lot more discoverable than Linux seems to me.
- mjburgess 4y agoIncidentally, I needed to teach myself PS for an azure-focused client of mine -- and I did so on mac (incidentally, making notes in a jupyter notebook with PS backend). It's a weird language, but I always reminded myself of its competitor: bash -- which is perhaps an order of magnitude more weird. It feels like it could be a "shell language for the cloud", ie., the language for cross-OS cloud automation work.
- vxNsr 4y ago> It feels like it could be a "shell language for the cloud", ie., the language for cross-OS cloud automation work. Isn't that terraform?
- BLKNSLVR 4y agoIs it possible to "learn" Powershell? My very limited experience has been: look up problem, find likely solution, enter 60-character command specific to this niche issue that I'll only ever have to use again in this exact situation, which is now solved until next reinstall. Having said that, those are the only situations in which I've needed to use powershell.
- chokolad 4y agothere are wonderful books, that go deep into the language, or provide bunch of solutions to practical problems. Pick your poison: Powershell in Depth [1] Powershell Cookbook [2] [1] https://www.manning.com/books/powershell-in-depth https://www.manning.com/books/powershell-in-depth [2] https://www.oreilly.com/library/view/powershell-cookbook-4th/9781098101596/ https://www.oreilly.com/library/view/powershell-cookbook-4th...
- CWuestefeld 4y agoTo be fair, as a native of Windows, you seem to be describing the process I need to go through for stuff like maintenance of my home Plex server (which runs on Linux). I'd even argue that, between PowerShell's kinda-guessable commands and parameter names (as contrasted to bash/linux) and ubiquitous --help, PS makes it easier (relatively) to discover a solution on your own. I guess a big part of this is what your native language is.
- Macha 4y ago> I'd even argue that, between PowerShell's kinda-guessable commands and parameter names (as contrasted to bash/linux) and ubiquitous --help, PS makes it easier (relatively) to discover a solution on your own. Yeah, if I'm trying to find something out on Unix-y world I have the escalation tree of 1. Tab Completion shows summaries 2. Still not clear? --help will usually print out an overview 3. Really still not clear? "man" to the rescue.
- oefrha 4y agoI'm certain I once wrote a long rant about why I think the concept of PowerShell (using objects instead of text as interface) is interesting but it fell flat on execution and felt like something in the uncanny valley between *nix shells and Python/Perl, with a thousand papercuts. I'm not gonna dig that out, but to add some points I can remember at the moment to yours: - Write-Output and friends try to be smart and print different things situationally. I hate "smart". - Try to get something akin to set -e -o pipefail, i.e. exit if a command fails. Pain. - Try to get something akin to set -x for tracing. There's Set-PSDebug, but the trace level also applies to all the cmdlets, so say you use Expand-Archive, suddenly you have a million lines of crap in your trace you don't give a shit about. In general, IMO the biggest advantage of PowerShell compared to scripting languages like Python/Perl is the ability to natively interact with Windows' COM stuff. That advantage is nonexistent on *nix.
- smackeyacky 4y agoAnd even the com integration is poor. Trying to script anything to do with Outlook is so failure prone and unreliable it turned me off powershell altogether.
- vladvasiliu 4y agoI've actually installed Powershell on my Linux PC last year. I daily drive a Linux box, but I sometimes have to interact with my employer's MS ecosystem (that's technically not my job, so running Linux is fine most of the time). After waiting for the installation to do god knows what for what felt like ever (and I was running an 8 core Xeon with a fast NVMe drive at the time...) I attempted to connect to the Office 365 tenant to do something. Since it was my first attempt at running this on Linux, I was following along with the MS docs (actual docs.ms, not the TechNet circus) and I started getting uncomfortable with statements along the lines of "this should work". I mean, if you're not sure, who can be? Anyway, it managed to install whatever libraries it wanted, so I was ready to go. But everything ended abruptly with some "incorrect credentials" or similar. The credentials were, of course, OK (they worked fine in the web-based admin console). But after some digging, it turned out that, contrary to what the MS docs said, you can't connect to Office365 from linux...