Earlier quoted context omitted.
But are all cmd commands portable verbatim to powershell? With all the options / special characters? (I don't know the answer, but https://en.wikipedia.org/wiki/PowerShell#Comparison_of_cmdle... lists quite a few missing commands, including "talkkill" and "find") With the amount of online posts that tell you "to achieve X, open command prompt and run ...", it would be a bad idea to break any of them that go beyond a…
There can be several aliases for a single command. ls=dir=gci="Get-ChildItem" But you can't run just run "dir /s". You'd have to say "Get-ChildItem -Recurse" which can be shortened to "dir -Recurse" which can be shortened to "dir -r". When scripting, you try to use the longform versions. With one-liners, you just sort of fall into whatever paradigm you were previously accustomed to for your first argument.
Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
331–340 of 350 posts
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#332Earlier quoted context omitted.
I've used iTerm and Terminal on Mac, and the default Windows Terminal (conhost), PuTTY sand MinTTY on Windows. Terminal.app is much, much better than conhost, even after the Windows 10 update. It's fast, supports a ton of thoughtful features (such as customizable title bars via extended ANSI codes, real line wrapping during resize, good Unicode support from the very beginning, etc.). With Terminal.app I can be quite…
> PowerShell's terminal experience is better but not quite there. And, PS suffers from extremely long load times - I've seen it take upwards of 10 seconds to start without any extensions. Small price to pay to be able to pipe objects , man!
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#333Windows fan here. I hate PowerShell and I'd much rather have Bash built into Windows. Things I hate about PowerShell: - You can't even run your own scripts without performing the Set-ExecutionPolicy ceremony first or signing your scripts. - It's way too verbose. - It's a strange bird that next to nobody uses, so there's zero motivation to learn it. - It's not "old reliable". You can't depend on it working due to the…
Literally every windows admin uses it. It's the official commandline interface for microsoft software. Every piece of microsoft software must provide a ps interface. It's an engineering directive.
And how much people with those be? Probably a lot less that software developers in general, and non-windows admins.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#334Earlier quoted context omitted.
Well, the nice thing in PowerShell is that you have explicit control over "stop parsing here and just pass the rest to the application verbatim" with --%. Solves a lot of quoting nightmares.
How come none of the tutorials I've read and StackOverflow questions involving Start-Process mention that? Thanks.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#335Earlier quoted context omitted.
Related, running something like decrypt hugefile.dat | encode outfile.dat will usually result in powershell using up all your system ram and crashing.
Most likely because it loads it all into memory, rather than say streaming it.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#336Earlier quoted context omitted.
> PowerShell's terminal experience is better but not quite there. And, PS suffers from extremely long load times - I've seen it take upwards of 10 seconds to start without any extensions. Small price to pay to be able to pipe objects , man!
Sorry about that - we lost control of our startup times in PS V3 and have been working to get it back under control. PowerShell V5 had substantial improvements but we keep working on it and V5.1 is even faster. Give it a try - I think you'll like it. Jeffrey Snover [MSFT]
I basically stopped using ps ( for smaller stuff) because the startup tone is so awful.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#337Earlier quoted context omitted.
The ise can do that if you've got the object at the time you're writing like that, it can't run a command for you as your typing it. You'll never get a drop down list in the host terminal windows has it doesn't have a GUI layer like that. Wrap it in a electron app and make one. you can type `dir - ` and cycle through the options. type `get-help dir` to see what they do or install posh-git and use `dir - ` to get a me…
You'll never get a drop down list in the host terminal windows has it doesn't have a GUI layer like that. Except you do, with PSReadline, built into Windows 10 PowerShell.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#338Earlier quoted context omitted.
Drag-resize (affecting buffer, as well) is nice, finally. And you can change opacity in properties, making your window transparent. What I really like though: you can now use Shift + arrow keys to select text and C-c/C-p to copy/paste.
If you're going to use CMD/PS on windows you might go whole hog and install ConEmu. Then load it up with Cygwin, and DosBox. ConEmu can even integrate stuff like Putty.
So this explains the joy I feel over small improvements like those mentioned above.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#339That's nice. Can you pipe binary data without powershell corrupting it, or is that now a feature? https://brianreiter.org/2010/01/29/powershells-object-pipeli...
This bit me badly when trying to pipe GPG output. I ended up building a command string and sending it to cmd. :|
If you don't pass the flags zo handle it as binary in those cases stuff breaks.
Re: Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build
#340Earlier quoted context omitted.
It's not that weird, they put the alias' in so new admins on windows fresh from linux don't hit a complete roadblock at the first command they type. Its to make powershell less punishing to learn, not emulate a different system. So imagine when they packaged that for Mac, that assumption is no longer true.
I would argue that for scripting portability, this should be the same. With wget equivalent in Powershell being so different for example, scripts that use aliases will be broken. Granted, don't use aliases in scripts and all that.