Why does PowerShell even exist?

Why does PowerShell even exist?

Attached: Screenshot_20180630_110859.png (745x125, 8K)

Other urls found in this thread:

github.com/PowerShellMafia/PowerSploit
blog.nullspace.io/batch.html
en.wikipedia.org/wiki/Dust_explosion
twitter.com/NSFWRedditVideo

P**Sh**** is meant to be a placebo

To extend Microsoft Certification points to more pajeets

It works on GNU/Linux btw :^)

Because batch is shit
Powershell is great for the intended use case
CLR interop and full access to .NET is very powerful if you need to slap some shitty script together

Because it manages to be slightly better than Batch, which is a really low standard but whatever

Windows has too much binary goop for unix shells to be useful for scripting admin work. Thus PowerShell.

created by an old DEC guy, as with pike you have to keep these grandpas busy or they wander off

Everything is an object, faggot.

EVERYTHING

IS

AN

OBJECT
B
J
E
C
T

Attached: 1523609503761.jpg (1137x1280, 101K)

If shit fucks up with the GUI (with exchange 365, for example), PS is always there to get you outta shit

It's in the name - it powers hell.

Attached: 1530922287604.jpg (720x615, 237K)

nice concept
typical execution

Hello my friend. I just wanted to let you know that Powershell is not a "meme" but a very important technology. I myself am certified in it. Anyway I hope you have a blessed day my friend.

What are advantages? It seems like Windows went the wrong, more complicated way and then MS tried to make a universal shell to cover everything, like sh did.

I don't know, I guess if you're knee deep in the .NET ecosystem PowerShell would be a natural tool to use. But overall I think the 'everything is an object' abstraction causes more damage and confusion in the long run.

>md MyNewFolder

Attached: 15240759037020.png (429x410, 10K)

I know it seems like a meme/Pajeet technology, but it's actually really nice for scripting on Windows machines. There are a lot of things .NET can do natively that in bash you would need a separate program for (e.g. certain cryptographic functions). It's very nice to have a unified API and the ability to use LINQ in your scripts.

that's pretty much it - PowerShell was designed to deal with the atrocities that are .NET and Windows. there's no advantage in using it in a Unix environment, just like there's no advantage in using bash on Windows.

based pajeet

It's more explicit about how things will work together, e.g. iterating over items in a list outputted by another PowerShell command. Since PowerShell harnesses .NET, things are going to implement common interfaces (e.g. IEnumerable, allowing for looping over the items in a collection) which make it automatically clear what you can do with them. If you're already used to .NET you'll love it since it essentially works the same except I believe PowerShell is dynamically typed. It helps that the .NET documentation is very good, with lots of good examples even in the documentation (honestly some of.the best technical documentation I've ever seen), which makes it very quick and easy to write scripts with little starting knowledge.

python is much better at scripting, including the .NET interop

it's pretty bad in a interactive shell though, even worse than powershell

Python is a terrible command interpreter and doesn't integrate well with command line programs so it really doesn't fill the same roll

All the common unix commands are included as aliases out of the box. Not that you'd know that, since you've never even used Powershell in the first place.

Attached: op the fag.png (1295x639, 23K)

Yeah, had to make some shit that synced some random ass db view to some enterprise system via a rest api for a customer and it was really easy with powershell even though I had never used it in my life before then

>the verbose garbage fire that is Powershell is all right because few commands have sane aliases

>what do you mean I have to actually tell it what I want it to do instead of throwing around random single letter switches and obtuse abbreviations? I CAN'T TYPE QUICKLY ENOUGH FOR THAT

i bet you use hungarian notation

>conemu
+1

>you have to type a short novel worth of long options because single character options couldn't possibly work anywhere
>no, UNIX working since 1969 isn't an argument

The verbosity thing isn't even really a factor at all because Powershell has extremely good tab completion for these commands. It can complete both argument names and enumerated values, like the "Directory" in -ItemType for New-Item. You just type the first letter for everything after New-Item and tab complete.

>I fail to understand that people use certain software more often than other therefore giving them the option of using abbreviated -f flags and the options to combine them instead of long --flags improves their workflow
No wonder that Currysoft is such a shitshow nowadays if their developer base and userbase has this mindset of yours

It does.
I actually didn't even know because I always just tab it but there you go.

Attached: come on.png (438x212, 5K)

Thank you for your post, Mr Rashijgopalan.

And if that's still too much for you, you can actually go EVEN SHORTER.
Who knew?

Attached: even better.png (529x168, 5K)

Because MS generally can't into scripting languages.
>UNIX working
heh
topzozzle

"mkdir"

That literally works too. What do you even want?

You don't even need automatic completion. OP's command could be as short as (besides the mkdir/md):
ni MyNewFolder -i d

How does that work? "ni" is the alias for New-Item. "-Name" is a manadatory positional parameter so it can be skipped, very first string that's not bound to a parameter will be recognized as the name. "-i" stands for "-ItemType" and it's recognized as such because no other parameter starts with "I". Same for the enumerated argument "Directory", no other value in the enumeration starts with "d".

The only people on Jow Forums who keep complaining about verbosity do not know Powershell well enough. It's always the case.

Attached: 005.png (512x128, 2K)

>The verbosity thing isn't even really a factor at all because Powershell has extremely good tab completion for these commands
Except there's lots of commands with similar names that you have to either TAB through or write out enough of it to be unique.
Also, all modern Unix shells have even better programmable completion. Microsoft is doing the bare minimum to make PS not suck completely.
And don't get me started on the unreadable error messages, but that's moving the goalposts a bit.

Reusing bash aliases was kind of a dumb idea. They had to remove wget and curl aliases for Powershell Core.

That's why you install Psreadline and make your life easier.

Attached: 006.png (1009x196, 11K)

meant for

The aliases don't behave the same as the actual POSIX commands though.

/thread

Attached: 1394275853668.gif (300x300, 1012K)

Don't care, it gave us PowerSploit github.com/PowerShellMafia/PowerSploit

Literally md MyNewFolder

>Unix way
>two-tools for making a filesystem item
>touch/mkdir

>PowerShell
>only-one: New-Item
>aliases for files (touch) and dirs (mkdir)

>two-tools for making a filesystem item
touch, mkdir, ln, mknod, mkfifo...

If you know what you're doing, it's great

>ni -I Dir -N "easy"

Because it's comfy AF and just werks with everything

Literally this

where can I learn more about power shell? are there online courses for it?

Weak attempt by Microsoft to show that they can computer, too.

Attached: maximum resolution by default.png (1200x800, 524K)

b-but pike is based and will do the opposite

Powershell in a month of lunches

>Powershell in a month of lunches
nice
thank you

i just use the bash shell that comes with git for windows

You know you can just use mkdir in Powershell, right?

Powershell is mostly pointless for end-user / client shit. Where it really comes in handy is running batch jobs for managing Windows infrastructure - Exchange, Active Directory, O365 etc.

What about wmic?

No one ever talks about wmic :(

If you put it up to your ear,you can hear the ocean.

Or VBScript - which, apart from interactivity, does 90% of what PS does (admittedly with WMI's help).

except when your forest has 5000+ entries it'll take 20 minutes to run a script and fail anyway

i use pyAD now for AD/o365 stuff, does the trick.

Because the devs weren't allowed to turn Command Prompt into PowerShell so they just made it its own shell

>placebo
You either don't know what that means or you have no argument (I'm guessing both?)

So? It's not a Unix-like, install Cygwin or some other POSIX subsystem if you really can't understand anything other than what you imprinted on.

Why would you want to use that garbage language.

What's happening in that gif?

flour catches fire when spread too thin, like when it's falling

I haven't written much PowerShell but when I have, I hated it all the way up until the scripts are finished/functional. Creating sick pipelines is frustrating to debug and the verbosity of everything is slightly annoying (although I see the necessity of it). However, it's nice when it's done, you just see this somewhat concise through line coupled with nice semantics around fanning (outwards and inwards) output/objects.

Because it was the only inbox "better than batch" language for 15 years or so?

Attached: 29mxcuu.jpg (200x200, 7K)

>trying to make your shitty script language relevant

>self-censorship

k*** your***f

Do you use it for new tasks out of habit old man?

It is the backbone of the empire exploit script. vbscript does some scary shit in windows

This. Things my windows shop is running that I've built using PS:
>SQL integrated inventory &app Management system
>JIRA automation
>TEAMS bot
>desktop app for a call center survey platform using Windows Forms as a GUI

Currently rebuilding our Facebook analytics app because the C dude can't fix his shit and it's been down for 2 weeks. Built a generalized script with a bunch of complex selection logic pulling from dbs, gathering metrics for any number of pages/campaigns, doing a bunch of mapping and storing it. The thing is a massive improvement on the existing system and it only took 3 days as a background project. Never touched oauth or Facebook apps before, took 2 hours to get server side auth setup.

Shit just works. If i had a better background I'd probably hate it, but goddamn it's versatile. I unironically love powershell

Attached: 1526244059786.jpg (640x640, 114K)

Yes. It's actually a very capable language, and it's write once, run anywhere - the VBScript runtime has been there since your dad was sneaking handjobs off your mom in your grandparents' bathroom. Ancient Windows, WinPE , it's there, and ItJustWorks(TM).

When people were on Win95 or ran everything as Administrator, yes. Of course, bash and PS can do "scary shit" when they have total run of the system.
>rm -rf /
>rd /s *

>Yes.
>capable language
>runs on my XP machine
the eternal boomer...

Attached: 1517121092566.jpg (225x225, 7K)

Attached: Screenshot - 2018-07-25 , 10_16_30 AM.jpg (856x222, 22K)

>no advantage in using bash on Windows.
What about the builtins? I doubt anything in PS can live up to find,sed and co.

because batch is fucking awful
blog.nullspace.io/batch.html

Attached: 1492644996302.png (540x301, 132K)

Just call $_.Reveal() in the pipeline, or $Post.Reveal() out of scope, if you want to see it.

Because Micropenis Currydows needs a decent scriptable command shell, just like every other OS on the planet. Linux has bash, BSD has tcsh and ksh, Unix has csh, OS X has bash, etc. And Winshit is stuck with PooperShell.

user, can you watch your language?

Go fuck yourself.

Attached: 1441749297582-1.gif (268x280, 1.38M)

Windows doesn't "need" a command shell

Yes, you click the desktop icon and your dumb game opens. It's not like businesses or developers would want a command shell. Nah, screw them. Just make the whole OS entirely for NEETs who do nothing of importance until they shoot themselves at age 30.

Piss off, /v/tard.

Yeah I want to do work, not dick around with a CLI

>t. non-programmer brainlet
Playing games is not work.

No, I program. Doesn't mean i use exclusively FOSSshit. There's more you can do with a computer

I use Winshit at work and PowerShell is incredibly useful. Stop lying, you fucking /v/toddler.

Attached: 1481776845388.png (400x389, 48K)

yeah but it doesn't mean that windows needs it

eee

>yeah but it doesn't mean that windows needs it

>What do you mean you need 1GB of RAM? What do you mean you need a GUI? What do you mean you need a shell? What do you mean you need a kernel? What do you mean you need a breadboard with hand wired logic that lights up LEDs? What do you mean you need a computer? Dude just use an abacus. No one needs a computer!

Attached: 1526078534530.gif (500x493, 631K)

have you never heard of ipython?
not saying it's a perfect shell replacement, but better than using ms shit

How do you output text on the status of your program without a text stream to stdout?

Attached: 1532360498352.png (1920x1041, 1.31M)

wind mills used to explode because of shit like that
en.wikipedia.org/wiki/Dust_explosion

Attached: Staubexplosion.jpg (600x800, 134K)

Yeah, a dedicated server doesn't need a scripting language to assist with task automation and making life simpler.
Get out of your basement and get a job working on Winshit servers and tell me otherwise that powershell isn't the best thing ever for those environments.

>1: echo hello
>2: sysem("pause")
>3: goto 1

And where does echo pipe to?