Powershell

Is powershell as good as its Linux or Mac counterparts?

I heard that shell scripting is designed around the unix type of filesystem or something, so it doesn't have the native feel on windows. Apart from that are there any big drawbacks?

Attached: powershell[1].png (952x318, 63K)

The dialect is a huge cluster fuck
Because of the fact that rights management on windows is garbage, it is a huge pain in the ass to do any kind of changes to changes to the windows registry
Literally what would just require me to run the script with Sudo in Bash requires 50 lines of powershell in addition to having to run the script as Admin

>CrypticName-GetThing

It's a shell done right.
Freetards will defend their full retard 4 decade old illegible gibberish "lul so geeky" "1337" 2-3 letter backronym commands from a time when computers couldn't handle more than 8 characters though.

They want "muh job security" because they memorized a handful of obtuse commands that don't even make sense and look like an absolute clusterfuck to anyone trying to take over for you.

Meanwhile, powershell scripts are meant to be instantly readable by anyone even if you didn't comment at all. They're write once use forever. This threatens the freetards' "job security," thus they hate it.

Attached: 1498245120549.png (775x1108, 138K)

I only used it for quick deploying shit in azure
You could deploy a website with load balancing, cache, cdn and replication that could cater millions of users in a couple of lines

The syntax is ugly as fuck, but it does work. It's a better programming language than bash. But it's a way worse shell than bash. Make of that what you will.

Powershell is outright confusing. Bash is all text based. Simple. Powershell uses weird, obtuse objects. How easy is it to develop a program to use with powershell? In bash, you can write and start using a text based program in minutes.

New-Item -Path $registryPath
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD

so hard woah

>Better programming languange than Bash
Bash and PowerShell are not programming languages.

t. microsoftie defending his own job security

how about you talk about real advantages of using ps instead of pulling that "everyone can read ps scripts fact" out of your ass?

in my case, i work with several windows servers and i avoid ps unless necessary, the examples given by microsoft are truly unreadable and the command names are just plain weird and verbose.

also, i can't trust a team after their whole curl as an alias problem. it's all just seems forced like most ms products

Wtf is that? Too verbose.

>meaningful variable names are verbose
knit your sweater

Get-ADUser

Copy-Item

gee I wonder what these do its so hard I wish I was a leet haxor like pajeet!

Yay another person who does not understand it so they assume it sucks

That's how you print the contents of the current directory.

Microsoft was designed to be controlled with buttons. After noticing professionals who use unix shells make more money, microsoft had to build the powershell on top of the gui controls, it's a botched mess.

>Microsoft was designed
I meant windows

Powershell is a scripting language for .NET, it's not comparable to bash.

The unix philsophy is that you compose a bunch of smaller programs together to do what you want to do. The programs are typically very simple, written in C, and their input/ouptut is all based on plain text.

The .NET philosophy is a ripoff of Java and is based on intentionally having a huge and complicated class hierarchy. Everything is object-oriented and strongly typed. I for one do not see the purpose in having a shell that throws type errors.

>ls (dash)lAh
>no need to hit tab
Take your nootropics. Bash doesn't require that much gray matter.

>instantly readable
>you don't understand it, stupid.
Pick one. Powershell objects are unintuitive.

you did delete that yourself

>Name
>Path
>Value
>PropertyType
>ItemProperty
That's too verbose for you? Impressive.

>too verbose
Yes, it has more words than your "clever" reply.

That wasn't an attempt at a clever reply. I was just calling you an idiot.

>Is powershell as good as its Linux or Mac counterparts
No

>subtle insult
>t-that wasn't suppose to be clever!
>calls others idiots
Typical windows user.

You literally have zero clue what you are talking about.

You make zero points in that retort.

>a huge pain in the ass to do any kind of changes to changes to the windows registry
>Literally what would just require me to run the script with Sudo in Bash requires 50 lines of powershell
Because I don't need to make any retorts you dunning kruger. Changing the registry in powershell is easy as fuck, you can access the registry as a directory and read/write/modify entries as files. You picked one of the easiest things to do with powershell as your example of something difficult because you literally do not have a clue what you are talking about. Because you want a bunch of hugbox (You)s for hating on microsoft.

>Because I don't need to make any retorts
>makes another retort, this time a contradictive one
Changing the windows registry is made easier with powershell. You can "cd" into the registry, doesn't make it "easy as fuck." I didn't pick anything, I just called you out for shitposting. You're not as smart as you think you are.
>You are, unironically, the epitome of the dunning-krugger effect

Attached: Screenshot_20180320-144945.png (720x1280, 205K)

bash isnt meant to be programming lang. iys meant to automate administrive tasks.

>shell script

Attached: [Untitled].jpg (834x503, 112K)

>BSD

install git bash, its great and comes with everything you will ever need

It is great for administration of windows clients and servers and the object oriented nature makes automating tasks pretty easy.
Its the only thing I like about windows.

this. neither shell is better or worse without taking the whole system in consideration. if you have to deal with Windows, you use PowerShell, it's that simple.

From my admittedly limited experience, it's a useless piece of shit. Nothing "just works" unless you do it through a GUI.

PowerShell is actually far, far superior to anything found in the Linux ecosystem. Anyone who is an IT professional or has spend a lot of time working via CLI will tell you the same. Don't fall for Sup Forums's memes.

Sanjit brother bring the naan

Bash makes windows a lot more tolerable.

Are you asking if powershell is good as bash? No it's not. Linux has powershell and windows has bash btw.

> Is powershell as good as its Linux or Mac counterparts?
No. Powershell is comparatively very shitty in actual use. Overly verbose .NET garbage.

The Linux shells have a far more sensible place in both interactive and scripting use. [Even if the scripting languages only get you so far before you probably use Python or whatever you like anyhow.]

It's the same if you consider wiping your ass with your hand the same as using comfy toilet paper.

Please sirs do not knowingly spread lies against PS. PowerShell comes with the most advanced OS known, Windows 10. It is by far the most feature rich CLI. It saddens me that the original poster might be influenced by your false words.

Attached: 1484349281404.jpg (498x738, 73K)

Powershell isn't strongly typed, however you can make it strongly typed if you want by using syntax in specific ways. There's lots of type-cross conversion that happens behind the scenes leaving the user to not bother with any of that like he would in C#.
It seems that you, and just so commonly others, just aren't actually familiar with Powershell.

Every single criticism over "verbosity" that I've read I imagine comes from someone who at best spent half an hour trying out commands or more likely reading a tutorial and simply decided it's not for him. It's that level of inacquaintance that fails to see that majority of commands have aliases, that parameters can have aliases, that parameters that don't have aliases have automatic aliases, that parameters can be ommitted based on supplied argument type and position, that pipeline input doesn't have to be specified ever. Nevermind that initial level of verbosity is good for introductory purposes and discoverability. Same occurence in absolutely every thread.

Small stupid question: what's better bash or zsh? And why?

Now here's the same thing in bash:
echo $value > $configpath/name

this
PowerShell's shortcomings are an extension of Windows's shortcomings as an OS built on top of a giant OO mess where everything must be a method/property in an overly confusing and rigid class hierarchy
bash/POSIX shell's strengths are an extension of *nix's strengths as an OS designed around a philosophy of "everything is a file, all configuration is text, each utility is a separate program that performs a simple operation"

Attached: 1691869.jpg (403x500, 36K)

cat
cp

>Is powershell as good as its Linux or Mac counterparts?
No.

It's better.

>Bash and PowerShell are not programming languages.
for Bash at least, that's just flat out wrong
like, Bash isn't merely Turing complete, but has program flow control, functions, and constructs to perform arithmetic internally

haven't actually used PowerShell, so I can't comment on that, but you can straight up write main application logic in Bash, as poor as an idea as that is usually

PowerShell names look like ass.
admittedly, Bash's syntax is fuck awful, and I'd probably get used to PS if I had any real reason to use it (got cygwin on my machine and a symlink to %homepath% in ~, I don't do any management of Windows machines other than my own and largely just copy scripts I wrote on Linux over to the Windows machine, I've got basically zero incentive or reason to bother with PS)

>bash isnt meant to be programming lang. iys meant to automate administrive tasks.
sure, shell scripts were invented for that, but Bash adds enough features to properly qualify
you'd really use it to glue other programs together though -- eg, write the parts you need in an actual nice or fast language and get it all working together via Bash