[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>/g/ hates Powershell now What happened?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 105
Thread images: 15

File: ps_logo[1].jpg (42KB, 591x457px) Image search: [Google]
ps_logo[1].jpg
42KB, 591x457px
>/g/ hates Powershell now
What happened?
>>
File: sicromoft.png (24KB, 255x65px) Image search: [Google]
sicromoft.png
24KB, 255x65px
>>59933636
>>
>>59933645
What are you implying.
>>
>>59933636
/g/ never liked powershell.
powershell is for windows.
>>
File: 1434402902689.gif (1MB, 200x200px) Image search: [Google]
1434402902689.gif
1MB, 200x200px
>>59933636
>somebody hates ps, therefore we all hate ps.

Not true anon, ps is pretty neat, in fact for remote administration it's a godsend. v3 is sweet AF
>>
>>59933636
it's alright save for the extremely long command names
>>
It ain't zshl
>>
>>59933745
Powershell is open sores now. You can run in Leenucks.

>>59933765
Just use aliases. Run
Get-Alias

to return a list of available aliases. You can create system-wide aliases too similar to modules.
>>
>>59933815
>not using gal

It's like you want to be unproductive
>>
>>59933929
I want readability :^)
>>
>>59933815
>using powershell over bash
horrible idea
>>
>>59934327
Objects > Text
>>
Some command lines don't work in Powershell but work just fine using CMD. Powershell is shit.
>>
>>59934443
Pipelines in powershell and cmd behave differently. If you want to have similar experience to cmd just prepend
cmd /c
before the command. It'll then run under cmd's terms for the duration.
>>
powershell is slightly more convenient
>>
>>59933636
I personally like it, its not the best but its alright
>>
>/g/ hates CurryShell
And all is right in the world.
>>
>>59934524
Neat.
>>
>>59935098
I've not seen a single pajeet use Powershell.
>>
>>59935138
It's winshit and therefore DESIGNATED by default.
>>
I considered learning it but I'm too lazy, I'll probably write in batch forever and just use scripting languages for everything non-trivial.
>>
Having to write the equivalent of the entire english dictionary just to read every file recursively in a folder is probably not something every sysadmin enjoys
>>
better than the old cmd but worse than bash
>>
>>59935225
Since when
gci -r -file
is the "equivalent of the entire english dictionary" ?
>>
>>59933636
>now
lurk moar.
>>
take longer than Atom to open up

the creative update replaced cmd in the shift+right click context menu and it drove me nuts until i found out how to change it back to cmd, I don't wanna wait half a minute to run my python scripts
>>
>>59933815
>>59935272
Is there a standard parser for scripts that will expand aliases so that the script is actually usable by other users? Otherwise aliases don't seem like a real solution to the verbosity problem (outside of your own local machine).
>>
>>59935362
This bothered me too, why the fuck is it so slow? I would have no problem with them switching it to the default interpreter if it wasn't for that startup time. I'm not waiting a half second just to run a single command and exit.
>>
T3st
>>
(wget google.com -UseBasicParsing).Content | Measure-Object -line
>>
Is there any kind of iterm2 competitor for windows that can run power shell and bash?
>>
>>59935600
I wonder if you could just run tmux inside of bash then launch PS as needed.
>>
>>59935547
It shouldn't be hard to write a usuable function. There's one that deals with cmdlet names and works inside ISE:
https://gist.github.com/lazywinadmin/56abe85d9bdde62a31c3

A more fleshed out solution should also account for shortened cmdlet parameters. And maybe even aliases for parameters.
Most of what I do requires custom functions so I don't bother with aliasing when writing scripts. Self-telling names are my priority.
>>
>>59935590
Is this supposed to tell something?
>>
>>59933636
>_powershell
>>
Nothing, most of /g/ don't actually work in IT thus have no idea what PS is useful for and think it's something you can compare side by side to the likes of python
>>
Powershell is a member of the .NET family so can use most libraries C# can use

>>59938060
ye I do work in a windows only environment and its easily the most useful language for general sys admin work
>>
>>59938150
And in constrained delegation is limited when calling a .net library. It makes it difficult to call a file select UI element from within powershell when needed.

Not so much a powershell limitation, just something I happen to be fighting.
>>
>/g/ hates pajeetware
what's new?

obama is not a president anymore?
>>
>>59933765
>>59935547

I don't understand people complaining about verbosity when autocomplete exists. Also, Verb-Noun naming scheme makes it easier find what you want to do, and logically categorizes commands.

>>59934327
And why is that? Dealing with the clusterfuck that is complex text processing with awk/sed instead of Objects and powershell?
Being able to call the property of an object is a much cleaner solution. Not to mention that bash syntax is awful and full of gotchas and stupid conventions.
>>
>>59934524
or you could just type the command in fucking cmd you idiot
>>
>>59935193

You should byte the bullet. Looking back at Batch makes my eyes bleed. Powershell is the future of management in the MS ecosystem, so you should really learn it as soon as possible. Look at Server Core and Nano server, it's the direction in which MS is heading (No GUI).
>>
>>59935600

ConEMU
>>
>>59939730
Parsing stdout is simpler with powershell. But pipelines in ps only support object exchange so having to include cmd /c is a necessary approach.
>>
What does /g/ think of this?

https://github.com/xonsh/xonsh

Seems very similar to PowerShell in theory but it's closer to bash. stdout can be in python objects.
>>
I hate that globbing is done by the cmdlets instead of the shell. Dealing with filenames with glob chars with cmdlets or trying to use globs with external tools sucks in PowerShell.

There's other things that bother me but this one is by far the most annoying.
>>
>>59942509
Why do your filenames have glob chars?
As for the functionality being with the cmdlets, this means that powershell can be fully implemented outside of the default blue host.
>>
File: 1488908242981.jpg (79KB, 458x462px) Image search: [Google]
1488908242981.jpg
79KB, 458x462px
I've worked in Linux shops all my life, so while I've been aware of powershell's existence, I've never spent any time on it until this week.

Holy crap. It's actually good.

Imagine if every unix command had an --output-json flag, and a matching parser on the front-end.

No more fiddling about in textutils, grepping and awking and cutting and sedding, no more counting fields, no more tediously filtering out the header line from the output; you can pipe whole sets of records around, and select-where across them.

I'm only just starting out, so I'm sure there's much horribleness under the surface, but what little I've seen so far would seem to crap all over bash.

Bash is great for learning to think with the pipe. But powershell is ...a whole other level.

In bash, everything is text, so you have text problems (awk, sed, grep, need I say more)...but in PowerShell, everything is an object so you can just operate on it as such, and give it properties and methods.

It's really a fine piece of software. That and Active Directory are probably the two truly world-changing things that Microsoft has delivered in the 21st century. I tend not to be a fan of Microsoft, but I am definitely grateful for those two things.


Why did nobody tell me about this?
>>
>>59934417
Fuck off street shitter
>>
File: 8vpjFeZ.png (130KB, 600x600px) Image search: [Google]
8vpjFeZ.png
130KB, 600x600px
>>59933765

I agree. The Verb-Noun thing does make it easier to remember certain cmdlets and sometimes you can even guess a cmdlet you've never used or seen. But their dedication to making as many commands follow this format as possible has led to some real trash.

>Get-ADDomainControllerPasswordReplicationPolicyUsage

The only way I can defend Powershell is by saying that it should mainly be used for scripting. For their sake I'm going to assume it isn't meant to also be used as an interface like bash can be.
>>
>>59942636
Torrent files usually have some part within [] in the filename. Every once in a while a pattern trips up PowerShell and dealing with it is a pain in the ass.

It also means you need to pass glob patterns to a cmdlet to expand it if you want to pass it to something that isn't a cmdlet.

I just stopped using PowerShell for most things a while ago, it might have improved but I doubt it.

Filename expansion is one thing the bourne shell did perfectly and it should have been done the same way.
>>
>>59939708
How is
Case-sensitive-action-name <object>

Better than
Program --Action <object>
?
>>
>>59933636
>What happened?
"contrarianism"
>>
>>59942670
>Why did nobody tell me about this?

Because you're on /g/. The ones who might fall within Powershell user bracket either don't use Windows, don't administer systems or have taught themselves some other scripting language already, like Python. I don't even think C# users transition well because they are already acustomed to building applications (though there's a growing interest in light Powershell GUI applications as an alternative to compiled C# apps). Also troublesome is that it's advertised more as a tool for system administrators, which it excels at, but not as much as a general scripting language, even though it's well more than capable.
>>
>>59942670

I think most of the hate comes from people who didn't expect it to be so specialized. For everything besides administration it's pretty bad, but for administration there's nothing better. Windows Management Interface is a miracle.
>>
>>59942795
aye hurts, best bet ist to escape the brackets via -replace
pretty sucky
>>
Powershell is a hack to try and make windows more usable, but being a hack in both the literal and literary sense, it doesn't.
>>
>>59942795
hmm another solution is to use -LiteralPath parameter if the cmdlets have it. It then bypasses blobbing logic. Filtering can then performed via other paramaters like -Filter or -include/exclude or piping to where-object.
>>
>>59933636
>fucking long commands
>object oriented shell
>>
File: 1271270308341.jpg (51KB, 190x240px) Image search: [Google]
1271270308341.jpg
51KB, 190x240px
>>59934443
It has some uses, it's much easier to find and replace strings for example in powershell than the cmd.
>>
>>59933636
its slow af
>>
File: bash.png (9KB, 501x306px) Image search: [Google]
bash.png
9KB, 501x306px
>>59934327
>not using bash inside powershell
>>
>>59943645
You know whats really fucked up, you can't use powershell through Window's built in ssh server.
>>
What's the point, just the pre-defined cmdlets? If I'm on Windows, I'd rather use F# for scripting.
>>
>>59943996
What do you mean? I've used PowerShell over SSH before.
>>
>>59944032
An object oriented shell.

Also since .NET backs PowerShell there isn't anything stopping you from using F# in PowerShell.
https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.utility/add-type#example-7-add-an-f-compiler
>>
>>59942670
>Imagine if every unix command had an --output-json flag
Interestingly, FreeBSD has been converting all core commands to output text, JSON, XML or HTML.
>>
>>59943048
how is it a hack?
>>
>>59933749
You know there's a v4 now right?
>>
>>59935362
>the creative update replaced cmd in the shift+right click context menu
Are you fucking kidding me?
Fuck Microsoft. LTSB for life
>>
>>59944266
There's already fucking v6.

>>59944294
If you must use total shit you can change it back pussy.
>>
File: winderp.png (85KB, 960x531px) Image search: [Google]
winderp.png
85KB, 960x531px
>>59944050
It will just return a blank cmd prompt.
>>
>>59944334
RTFM

https://github.com/PowerShell/PowerShell/blob/866b558771a20cca3daa47f300e830b31a24ee95/docs/new-features/remoting-over-ssh/README.md
>>
>>59944351
It doesn't work with the Windows ssh server moron.
>>
File: 23tf341.jpg (26KB, 500x356px) Image search: [Google]
23tf341.jpg
26KB, 500x356px
>>59944385
>Windows ssh server
Stop using an abortion, RTFM and use / install OpenSSH.
>>
>>59944408
I literally specified the built in Windows ssh server.
If I'm gonna use free shit I'll just ssh into the Gentoo instance running in Hyper-V because that's where all my services that I use run.
>>
>>59944317
well fuck me

Although V6 is still alpha. Still, was not aware of 5.1
>>
>>59944427
You're using PowerShell dumbass, it's already "free shit".
>>
File: autism-asshole-disease.jpg (45KB, 600x750px) Image search: [Google]
autism-asshole-disease.jpg
45KB, 600x750px
>>59944458
Can't use PowerShell if it doesn't work by default.
>>
>Not using DASH
>>
File: ssh.png (4KB, 713x52px) Image search: [Google]
ssh.png
4KB, 713x52px
>>59944474
Sorry your retard.
>>
File: muhnips.png (205KB, 354x528px) Image search: [Google]
muhnips.png
205KB, 354x528px
>>59944583
First time I tried to use PowerShell (to try and log out) I had a permission error.

It was actually broken and a Windows update fixed it a few days later.

The Pajeets that made it don't even bother to make sure it works before they roll out updates.
>>
if i wanted a full blown programming language, I would use some shit like ruby, perl or javascript.

wtf is this .NET bullshit?

bash isn't perfect but it's both usable as a UI and as an "ok" scripting for basic manipulations.
>>
>>59944732
So the curryshits outsmarted you with run as?
>>
>>59944818
If by outsmarted you mean they completely broke Powershell for every Windows 10 install sure.
>>
>>59944853
Remember when have have to do adult work it's right click, run as admin!
>>
File: 1478256553457.jpg (59KB, 460x460px) Image search: [Google]
1478256553457.jpg
59KB, 460x460px
>>59939708
Sometimes when I hit tab, PS hangs for a while, I guess it takes a while for it to process autocomplete which makes me less likely to use it as an interactive shell. I've heard of other people complaining about powershells speed in other areas like startup time too so it's not just an isolated issue. It bothers me so much that I don't want to learn it even if it is nicer as a scripting language, if I can't use it as an interactive shell because the response time and the startup time when launching from another shell is slow, then I don't want to learn to script in it either.

I'm not trying to be negative, I hear good things about PS and they make me interested in trying it but the interactive experience really puts me off, which sucks for me since I want something better on Windows than cmd but I feel like PS isn't there yet. The scripting nightmare experiences with batch is what made me learn Python in the first place, anything felt like an improvement. The concepts of PS make it sound like a real successor but I guess the implementation or something is preventing it from being worthwhile. I don't know.
>>
>>59945484
They need user feedback for the developers to improve it but none of them actually use it so its basically DOA.
>>
>>59945533
>the developers
It's open source so the developers could be you friend!

>>59945484
What version are you on?
Post version four I haven't had much to complain about in the way of speed.
>>
File: Untitled.png (14KB, 533x380px) Image search: [Google]
Untitled.png
14KB, 533x380px
>>59942670
>Imagine if every unix command had an --output-json flag, and a matching parser on the front-end.
I feel like this is what pipes were meant for, but I too would prefer it if every program just had modules hook into them as parameters, kind of like how git does their hooks.

>>59939748
You know what it really is, I feel like I already wrote all the batch I'll ever need and I'm wondering what I might need powershell for that I haven't already written in another language.

I might have to just commit to using it as an interactive shell and make a decision. Lucky for me MS uses it as the default shell when you launch from the shift context menu in explorer (pic related because the description of it is weird) so I'll be forced to used it sometimes.

>>59945572
Major Minor Build Revision
----- ----- ----- --------
5 1 15063 138
This should be the shipping version with W10 SP2 or whatever the latest update through Windows Update is. Is this something they don't update and I should keep up to date manually? If so can I do it with OneGet?
>>
Also what's up with this, on my machine if I launch powershell from the win+x menu I think it uses different settings and maybe a different environment set than when I launch it from the explorer context menu. I think the explorer context doesn't pick up on the powershell profile ps1 either.
>>
File: Untitled.png (37KB, 1059x773px) Image search: [Google]
Untitled.png
37KB, 1059x773px
>>59945758
Pic related.
>>
>>59933636
Here is a challenge.. Change your shell to PowerShell.exe instead of Explorer.exe, system tweak startup services, install your favorite antivirus, share your performance from task manager. I average 894-929mb on ram usage.
>>
>>59946199
So is this like Windows core then?
I'm sitting at 620MB.
>>
>>59946537
Nope, I'm still using Windows 10 Pro. Are you using Windows Server 2012 Core? I have not tried the new 2016 version yet.
>>
>>59945872
https://superuser.com/questions/522950/how-it-happens-that-powershell-executed-with-run-and-with-pinned-icon-has-diff
>>
>>59946647
I tried it in a Win 10 VM.

>Are you using Windows Server 2012 Core? I have not tried the new 2016 version yet.
Yes, at home and work. 2016 Core isn't much different that 2012 R2 Core excpet that you can't uninstall and re-install the GUI at will, what you pick at install is what you keep.
>>
>>59946674
>Why such difference and is it any way to configure colors of pinned powershell same way i can configure powrshell that is started via "run" command.
>how-it-happens-that
Fucking pajeets just need to all die.
>>
>>59946674
That is annoying, thanks for the information though. There's probably a good way to just have them all pull from some static environment setup script but that's a dumb workaround and would add to the startup time. Things like this just make it seem like an unfinished product at this time, very frustrating.
>>
>>59942799

It's Verb-Noun <object>, in many cases the action is not necessary. Even then it's very specific. Overall that aspect is down to preference. At least in my case I'll take Powershell conventions over Bash conventions any day.
>>
>>59945484

What version are you on?
>>
>>59944732

>I had a permission error

Well then the logical recourse perhaps would to be to elevate privileges

>>59945533
The project is now open source, therefore you they are getting that user feedback and implementing it.

>>59945533
>basically DOA

LOL do you even Windows Admin? All major MS products have some sort of admin module via Powershell. You use Powershell for everything. And now that DSC exists and works across all platforms I can see admins using it to maintain and deploy configuration changes regardless of Windows or Linux platform.
>>
>>59944791
You can't be sure "ruby, perl or javascript" will be available on every windows machine. When it comes to distribution Powershell is easier to manage.
>>
I love powershell & don't give a shit what the lincucks playing pretend sysadmin think about it.
>>
>>59948490
bottom half >>59945654
I was kind of surprised after seeing this
>Significant performance improvements have been made to the first tab completion in a Windows PowerShell session, shortening tab completion time by nearly 500 ms.
>500 ms
https://msdn.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-windows-powershell-50#BKMK_bugs

It's better than I remember it when I tried it on Windows 7 but it still feels like there is room for them to improve. The thing that makes me mad is that even if I have another instance open it's slow to start another one, I would think some kind of caching would help somewhere, I don't know where the bottleneck is, why is it slow to start? I'm not on any fancy new hardware but I don't think I'm being crazy in saying I don't want to get an SSD to accommodate my command line shell if the bottleneck is I/O, that's the only thing on my machine I can think of that would be slow.
Thread posts: 105
Thread images: 15


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.