What? I'm a big PowerShell fan, but I see the need to keep cmd around for a while. Clobbering it before it's phased out seems problematic.
What? I'm a big PowerShell fan, but I see the need to keep cmd around for a while. Clobbering it before it's phased out seems problematic.
The release post spells out exactly what's changes - win-x menu, context menu kind of stuff.
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 simple command. (so for example any "FOR ..." lines)
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.
For example, bcdedit with its {}-delimited GUIDs breaks in PowerShell without additional quoting, but works fine in cmd.exe. Makes following online instructions tricky if you're not familiar with that nuance.
BTW `--` isn't treated specially in version 4 of Bash.
Thanks.
-bcdedit /c {xxxx-xxx-xxx-xxx} (= {..} is parsed as a code block)
-invoking executables with spaces in path bcdedit --% /c {xxxx-xxx-xxx-xxx}
& 'C:\Program Files\Foo\Foo.exe'