
Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build - ctoth
http://news.softpedia.com/news/microsoft-replaces-command-prompt-with-powershell-in-latest-windows-10-build-510328.shtml
======
dvh
Btw did anyone noticed that in windows 10 you can resize cmd.exe to more than
80 characters width! When I first saw it I almost cried.

~~~
nailer
Most Windows terminal people use ConEmu rather than the inbuilt terminal apps
- it's like iTerm2 vs Terminal.app on MacOS. ConEmu adds Unix style cut and
paste, tabs, etc. Add openssh, PSReadLine and PSCX and you've got a proper
terminal setup.

Also MS should really improve the inbuilt apps to do this stuff.

~~~
nneonneo
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 happy and productive even with someone else's Mac or with the default
settings. I've used iTerm2 but their features weren't compelling enough for
me, and the iTerm font rendering is noticeably worse in many ways. Apple has
also been very good about giving Terminal.app continuous updates.

On Windows though I have almost always had to install MinTTY or something just
to get a halfway usable terminal emulator. The default emulator is just so
limited - Unicode support is very plug and pray, the title bar is totally
locked, and having to use Windows APIs to change text formatting is a pain.
Conhost is also amazingly slow when it comes to large amounts of text, so much
so that printf can be extremely detrimental to program performance just
because it has to wait for the terminal window to catch up.

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. That means that in practice I often
pop open cmd.exe even if PS is a better choice, just because I don't want to
sit through a long load time.

Microsoft really should get their Terminal story in order. I'll definitely try
out ConEmu the next time I sit in front of a Windows box, but like you I wish
MS would improve their own apps!

~~~
bitwize
> 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!

~~~
JeffreySnover
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]

~~~
Bombthecat
I really hope so!

I basically stopped using ps ( for smaller stuff) because the startup tone is
so awful.

------
mauvehaus
That'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...](https://brianreiter.org/2010/01/29/powershells-object-pipeline-
corrupts-piped-binary-data/)

~~~
pjc50
It's amazing, isn't it. They went to the effort of building a typed shell but
didn't realise there are multiple different types of string.

I bet it still truncates output of the ">" operator to the console width, too.

~~~
jodrellblank

        'troll' * 1000 > out.txt
    

Open in NotePad++, no weird newlines in the wrong place, content not
truncated.

Were you using |format-table and |format-list (ft, fl) to explicitly format
the text for console viewing, then redirecting _that_ to a file?

~~~
pjc50
Took a while to reproduce the actual case, and it's Select-String that's at
fault. And it must be in "powershell" not "powershell ISE".

    
    
      'troll' * 1000 > troll.txt
    

.. works fine as you say

    
    
      Select-String -Path .\troll.txt -Pattern "t" > t.txt
    

.. wraps the output at the console width. Which means you can't use it as a
grep replacement.

~~~
jodrellblank
You can't use it _as grep in bash_ , because it isn't that. It outputs
[MatchInfo] objects, not text, and Out-File (>) formats complex objects for
console viewing (for ??? reasons), which is one reason > isn't a great PS
habit.

    
    
        Select-String -Path .\troll.txt -Pattern "t" | Set-Content t.txt
    
        or
    
        sls 't' .\troll.txt | sc t.txt

------
Diti
Something that irks me is how PowerShell’s _default_ aliases take precedence
over binaries in the PATH. To be able to use the GNU utils, you _have_ to put
this in your _profile.ps1_ :

    
    
      Remove-Item Alias:cat
      Remove-Item Alias:cp
      Remove-Item Alias:curl
      Remove-Item Alias:echo
      Remove-Item Alias:ls
      Remove-Item Alias:man
      Remove-Item Alias:mv
      Remove-Item Alias:pwd
      Remove-Item Alias:rm
      Remove-Item Alias:wget

~~~
ygra
Isn't that always the case, that shell built-ins take precedence over things
elsewhere in the system? On Unix you have to call them with their full path,
e.g. to get the system echo instead of bash's you need /bin/echo, I guess. On
Windows you can add the extension, i.e. use ls.exe instead. Even cmd shadows
programs that have the same name as a built-in, e.g. echo.exe must be called
as such and just echo will use the built-in command.

~~~
ryao
That is correct. Most people do not notice because the buildings in bash are
almost completely equivalent to the standalone binaries.

~~~
EE84M3i
I've only ever really noticed with 'time' and 'echo'

~~~
ryao
I have noticed this with echo too. In specific, the bash echo built in does
not drop support for -n and -e when bash is forced into standards compliance
mode as /bin/sh. That causes breakage on systems that use more strictly
compliant shells when code was written against bash as sh under the assumption
that either -n or -e work. I spotted a regression in Linus' tree a while back
where this very thing happened in the build system for perf. Sadly, my patch
to fix it was ignored:

[http://www.gossamer-
threads.com/lists/linux/kernel/2218440](http://www.gossamer-
threads.com/lists/linux/kernel/2218440)

~~~
zlynx
If it is still an issue you want to fix, you may need to resend the patch
periodically. It doesn't look like you got any response at all.

LKML gets hundreds of messages every day. When I used to read it I had a set
of search filters to prioritize it. Anything I didn't get to I simply marked
Read. There's no way to catch everything on there.

Maybe get it passed through by someone who is in Linus's email filters.

Although it's been a year and you probably don't care anymore. :)

------
FLGMwt
"Typing cmd in the run dialog will launch PowerShell as well"

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.

~~~
freedrock87
You can run any command from CMD in Powershell

~~~
viraptor
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...](https://en.wikipedia.org/wiki/PowerShell#Comparison_of_cmdlets_with_similar_commands)
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 simple command. (so for example any "FOR ..." lines)

~~~
orbitingpluto
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.

~~~
hobarrera
Such basic commands are actually CamelCase? It must be a pain for those with
no short-aliases.

------
aq3cn
That's not all in latest build 14971.

Cortana supports to do list now

Dial support for map app

Bringing 3D to Everyone via the Paint 3D Preview app (RIP paint.exe, I am
going to use picpick or paint.net from now on)

Read EPUB books in Microsoft Edge

Improved Typing Experience with Japanese and Chinese Input Method Editors

New Get Office hub for Windows Insiders

source:

[http://winaero.com/blog/microsoft-is-killing-the-classic-
pai...](http://winaero.com/blog/microsoft-is-killing-the-classic-paint-app-in-
windows-10-creators-update/)

[http://winaero.com/blog/microsoft-releases-new-get-office-
hu...](http://winaero.com/blog/microsoft-releases-new-get-office-hub-for-
windows-insiders/)

[http://winaero.com/blog/edge-gets-epub-support-in-
windows-10...](http://winaero.com/blog/edge-gets-epub-support-in-
windows-10-creators-update/)

[https://www.neowin.net/news/cortana-will-now-keep-track-
of-y...](https://www.neowin.net/news/cortana-will-now-keep-track-of-your-to-
do-lists)

[https://www.neowin.net/news/microsoft-adds-support-for-
surfa...](https://www.neowin.net/news/microsoft-adds-support-for-surface-dial-
new-touch-features-inside-of-maps)

[https://www.neowin.net/news/windows-10-build-14971-for-
pcs-n...](https://www.neowin.net/news/windows-10-build-14971-for-pcs-now-
available-in-the-fast-ring---here039s-what039s-new)

[https://www.neowin.net/news/here039s-what039s-fixed-
improved...](https://www.neowin.net/news/here039s-what039s-fixed-improved-and-
still-broken-in-windows-10-for-pcs-build-14971)

------
6u54wuwu5w
So, while I applaud this, I am concerned about the startup time of ps as
compared to the old command prompt. Has it been improved recently?

~~~
louhike
It's better but it's still slower than CMD on my computers.

~~~
algorithmsRcool
In particular if you have left the prompt window untouched for a few hours and
it has been paged out. Just pressing <tab> to complete a file name will hang
for 3-6 seconds on my computer while PS wakes back up.

CMD is always instantaneous.

I realize that PS is doing a lot more work to match commands but sometimes
simple is all that is needed.

------
pawadu
So basically instead of doing

    
    
        dir C:\
    

I have to learn to type

    
    
       List-Directory-With-Files Drive=C Folder=/
    

(made up example, but you get the point)

~~~
cm2187
Being verbose would be a good thing (more readable than a cryptic acronym) if
there was auto-complete support. A console should really be a small IDE that
gives live feedback on what arguments are possible in the current context,
etc. But that's not the way powershell was designed.

~~~
captainmuon
There is auto-complete support. I just tested it (not a powershell user
myself), and it seems pretty intelligent.

For example, if you type

    
    
        dir | sort <TAB>
    

it suggests Attributes, BaseName, CreationTime, .... All properties of file
objects (which is what dir returns).

Also there is PowerShell ISE, which is a IDE for powershell, but I haven't
really tried it yet.

~~~
cm2187
That's not what I mean by autocomplete. What I mean is more like Visual
Studio's intellisense, ie a drop down that lets you know what are all the
options from there. You can type DIR <TAB>, that won't tell you that you can
apply the parameters "/p" or "/w" nor what these parameters mean. ISE does a
slightly better job but is based on a static specs, rather than the current
state of the system. So it won't list the VM names currently active in the
system for instance.

Yes you can type -?, but that's as bad as having to go on the web to read the
documentation. It's disruptive. The point of a good auto-complete is to have a
list at your fingertips with a short description of what it does, without
interrupting your train of thought.

~~~
Rynant
If you type: dir -<Ctrl+Space> PowerShell will list all available parameters
below, and allow you to tab through them.

The tab completion is not static either. If you type: ps <Tab>, it will tab
through all the current processes.

~~~
cm2187
I you type "Start-VM -name <TAB>", it won't list the list of the VMs, but
rather the list of the files in the current directory. That's not exactly what
I would call insightful.

I didn't know about the CTR+SPACE. That being said it doesn't seem much more
insightful than TAB. And no description of what the argument does.

~~~
Rynant
The issue with "Start-VM -name <TAB>" is not an issue with Powershell itself,
but with the Start-VM cmdlet; the Start-VM cmdlet could have been designed to
complete from the list of VMs.

------
nailer
> Starting with Windows 10 build 14971, Microsoft is trying to make PowerShell
> the main command shell in the operating system.

> As a result, PowerShell officially replaces the Command Prompt in the Win +
> X menu, so when you right-click the Start menu, you’ll only be allowed to
> launch the more powerful app.

This is an older change - I have this behavior in 10.0.14393.0 (ie, current
stable).

cmd launching posh is new though.

~~~
ygra
There's an option in the Taskbar settings: »Replace Command Prompt with
Windows PowerShell in the menu when I right-click the start button or press
Windows key+X«. I suspect the default value for that setting has been false,
so far.

~~~
nailer
I have that here in stable. I suspect you're right and changing the default
might be what they mean (I think I already changed it because cmd is gross).

------
ashmud
I know we have machines with lots of RAM now, but at 90-100MB (PS) vs 4MB
(CMD) [1] RAM usage per instance (not counting the conhost instance that also
spawns), I think I would still want CMD around.

[1] Quick check done on my Win7x64 laptop.

~~~
Klathmon
Does that really affect you in any way? (And I'm really asking, not trying to
be snarky, I've got 64gb on my main dev machine so I really don't know...)

I can't imagine any scenario in my actual usage where I'll have 4mb (plus
whatever is needed to actually do the work) but not 100mb (plus whatever is
needed to actually do the work).

Also, on my machine (windows 10 stable branch) each PS window takes up about
20mb (at least the task manager is telling me that, I didn't dive any deeper)

~~~
ashmud
My work machine is not nearly that beefy. :| I do often have 8-10 cmd windows
open. According to task manager on my machine, each PS instance on start is
90-100MB. I didn't dig deeper to see if that RAM usage would shrink over time.

------
jongalloway2
I'm pretty sure the Softpedia article is incorrect in saying that "cmd" is now
aliased to powershell. I installed the update, and running cmd from search bar
(win cmd enter) and from run dialog (win+r cmd enter) both launch cmd.exe.

The release announcement post says "Typing “cmd” (or “powershell”) in File
Explorer’s address bar will remain a quick way to launch the command shell at
that location."

I honestly kind of wish it was aliases - I regularly launch a cmd window due
to decades of muscle memory, then remember I really probably wanted
powershell.

------
nmc
Official announcement:
[https://blogs.windows.com/windowsexperience/2016/11/17/annou...](https://blogs.windows.com/windowsexperience/2016/11/17/announcing-
windows-10-insider-preview-build-14971-for-pc/)

------
vic-traill
PS is pretty robust, but it's a bit verbose, to say the least.

As noted elsewhere, command processors internals like 'dir' and 'copy' are
supported, but aliased to something else. In the case of dir it's aliased to
Get-ChildItem, and copy to Copy-Item.

The latter breaks my favourite quick file create method:

C:\temp>copy con example.bat [return] commands go here^Z 1 file(s) copied.

I had a quick look at Copy-Item and there is no obvious way to use it to the
same effect that I can see.

[edit: added the [return] to make it more obvious]

------
chrsw
Hopefully one day Bash will be the default Windows CLI.

~~~
curt15
Bash has its warts too. Treating everything as strings can cause headaches
when filenames have spaces. As a long-time Linux user who recently learned
some powershell, I find Bash rather primitive after getting accustomed to an
environment where everything is an object.

I wonder how feasible it would be to build a powershell-like environment for
Linux on top of Python.

~~~
Arnavion
>I wonder how feasible it would be to build a powershell-like environment for
Linux on top of Python.

Well, you could just run PS itself.

[https://github.com/PowerShell/PowerShell/blob/master/docs/in...](https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md)

------
ungzd
Having repl of some strange CLR language as primary shell is weird but having
port of DOS shell is weird too.

~~~
baq
if you put it this way, having a repl of an organically grown language that
can barely do arithmetic is weird, too.

------
tonyplee
What happens if someone have batch files for some work flow routines?

Have to re-write all of them?

~~~
UnoriginalGuy
Nothing. Bat is a filetype, that file type is bound to executive in CMD's
context. You can even execute it from PS and have it run the Bat perfectly
normally (using CMD).

Ditto with VBS. You can execute VBS files from any context on Windows (e.g.
double click, PS, CMD, etc) and they'll always use the cscript engine.

------
mikerg87
Weird. I have 14971 installed and when I type CMD in the "ask me anything" box
or in the alt-r box I get good old CMD shell. Is this a config thing ?

~~~
Already__Taken
They're not removing cmd the console host. If you shift-right-click a folder
the context item is powershell now instead of command prompt.

~~~
zokier
The article would partially disagree with you:

> Typing cmd in the run dialog will launch PowerShell as well, so Microsoft
> has made a significant step towards phasing out the traditional Command
> Prompt.

Imho that sounds like stupid idea (and I like PS).

~~~
Tarean
Currently powershell just shells out to cmd.exe to run normal command line
apps And handle text streams anyway. How would that work?

~~~
zokier
My _guess_ is that MS will keep old cmd in place in system32, and do some
tricks with search paths to divert "unqualified" cmd to PS.

------
hugja
I'm probably wrong, but can you not type "ps" into CMD and get the PowerShell
prompt? If so, can you do it the other way around as well?

~~~
algorithmsRcool
you can run "powershell" from a CMD prompt and "cmd" from a powershell prompt.

You can also nest prompts to switch context between them.

~~~
yoz-y
You can also `start /b cmd` for some very interesting results. I still have
not understood why this works this way.

------
ChuckMcM
I like the signalling that perhaps Microsoft is taking the command line shells
seriously for their users for the first time in a long time.

------
Stratoscope
> _Microsoft is expected to get rid of [Command Prompt] completely at some
> point in the future._

This is extremely unlikely to ever happen. As long as people have .cmd and
.bat files they need to run, cmd.exe will still be around. They're not going
to just remove it and break all those scripts.

~~~
JeffreySnover
That is right.

CMD.exe will be around to support script execution for a long long time.

Jeffrey Snover [MSFT]

------
chiph
Uh-Oh. Work has many cmd scripts in use. They'll all have to be tested under
PS now.

~~~
ygra
No, batch files won't magically get run by PowerShell (and in fact cannot,
except for very trivial stuff).

------
mhd
By the way, where does the capitalized kebab case come from? Prior art or just
Microsofts general hankering for capitalization (e.g. C#s Class.DoSomething()
vs Java's Class.doSomething())?

~~~
Aaronepower
What you're thinking of is PascalCase

[https://en.m.wikipedia.org/wiki/PascalCase](https://en.m.wikipedia.org/wiki/PascalCase)

~~~
pritambaral
Your parent probably meant Kebab as in the dash (skewer-stick) between words.

------
innocenat
Personally I want to use PowerShell. The show-stopper for me is that I cannot
set default encoding for output redirection (>) to ascii/utf-8.

This is so important for things like Google Code Jam, etc.

~~~
ygra
I agree it's annoying¹, but I wouldn't call it a show-stopper. I have resorted
to Out-File -Encoding <foo> wherever I need file output.

_________________

¹ The redirection syntax cannot easily accommodate an encoding, so _in
general_ you cannot really use it everywhere anyway. I often need to use the
system's legacy codepage instead of Unicode, so UTF-8 by default would be just
as useless there. GCJ, however, could just accept text in any common encoding
instead of insisting on ASCII. Detecting UTF-16 isn't hard, even though common
Unix tools tend to treat it as arbitrary binary data instead of text.

Generally I'd say > is a convenience feature more than an actually useful
construct, at least in a shell like PowerShell. On Unix-likes > simply dumps
bytes since that's what the shell is built around. For PowerShell you could
just as well say you'd dump CLIXML instead, since the shell works with
objects. Since you have a few valid options you could either try to shoehorn
them into the syntax, either with various funny characters

    
    
        Get-Data > data-as-utf8.txt
        Get-Data >@ data-as-clixml.xml
        Get-Data >% data-as-utf16.txt
        ...
    

or add another expression somewhere

    
    
        Get-Data > data-as-utf8.txt,[Text.Encoding]::Utf8
    

all of which are options I'd say don't really fit into PowerShell, nor should
they be entertained. Does it really matter whether the last part of a pipeline
is a redirection operator or just a terminating command that writes the data
to a file? Conceptually I'd say having the pipeline end in a pipeline element
instead of something entirely else is preferable since it reduces the number
of distinct concepts.

------
marianov
How does PS compare to installing cygwyn and using bash ? (from a Linux user
perspective) does it support grep, find, ls, PS, pipes, etc?

~~~
steve-howard
Windows 10 actually has some fancy linux emulation stuff (
[https://insights.ubuntu.com/2016/03/30/ubuntu-on-windows-
the...](https://insights.ubuntu.com/2016/03/30/ubuntu-on-windows-the-ubuntu-
userspace-for-windows-developers/) ). Personally I wanted to like PowerShell
but its syntax and semantics were infuriatingly confusing.

------
cryptos
It would be nice, if they would improve the terminal window a bit with tabs
and the like (like Gnome Terminal for example).

~~~
TorKlingberg
Meanwhile, Gnome Terminal has been taking away the tabs...

~~~
tonyplee
Did they, why?

I have switch to xfce4-terminal for a while in all my system....

~~~
zlynx
They didn't take away terminal tabs.

------
ZeroClickOk
So many surprise and complains... Simply change what you want, PowerShell is
cross-platform and opensource:
[https://github.com/PowerShell/PowerShell](https://github.com/PowerShell/PowerShell)

------
EastSmith
Did they finally add persistent history oit of the box?

Peristent = close the terminal then open it and the last commands are
available.

And yes, I know you can hack it to be persistent.

------
rhabarba
I use ConEmu with PyCmd but I surely see why Powershell is an interesting
alternative. I'm just too lazy to get used to its command syntax.

------
Bedon292
I think this is probably a step in the right direction, but it still only has
16 colors. When are we going to get a command prompt with at least 256 colors
on Windows? There are already a bunch of linux consoles out there with true
color, but nothing for Windows. Am I crazy for caring about this?

------
gigatexal
I welcome this 100%.

------
oakwhiz
I hope the old CMD.exe is still available somewhere.

------
Animats
Is it Unicode by default now?

------
mgregory22
Will Far Manager still work?

------
WayneBro
Windows 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 first
point and also due to the fact that they're still working on it and even in
2016 they broke some PowerShell stuff with updates that needed to be
uninstalled (KB3176934).

~~~
UK-AL
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.

~~~
AnonymousPlanet
That's all correct and it is the right way to do things (especially from
Microsoft's perspective). However, the main goal of Powershell seems to be
providing a scripting language that can automate Windows internals and not a
shell in which you live in. Powershell is just a nice REPL, not so much a
shell as you might be used from Bash.

We have had Powershell for 10 years now. Has it taken off in a big way? No.
The admins you mentioned use it because simple automation is the one thing
GUIs cannot provide and MS had to face this after over a decade of denial.

Do people get out Powershell instead of Python to do cool new projects that
are unrelated to devops or admin work? Some maybe. But the real music plays
somewhere else. And some of the reasons for that have been mentioned by the
GP.

~~~
mahyarm
I wouldn't take out bash or zsh or whatever else to do a project either. But I
do use it when I want to run a bunch of cmdline tools.

Right tool for the job and all...

~~~
AnonymousPlanet
I compared Powershell to _Python_ regarding projects, not Bash.

It could have been 1\. a shell 2\. an automation tool 3\. a scripting
language, yet it fails at 1., is ignored regarding 3., and only succeds at 2.

------
serge2k
> as it replaces the super-popular Command Prompt

heh.

heh heh heh.

hahahahahahahahahahahahahahaha

------
godzillabrennus
Just another reason to stay away from Windows as a platform. Windows 10 is a
moving target if you are trying to work with it.

~~~
Goronmon
If you're not a fan of change, I feel like software development probably isn't
the right career choice.

~~~
jbb555
I'm not a fan of _BAD_ change.

~~~
Goronmon
Nothing would change if the pre-requisite to any given change was that
everyone agreed on the change beforehand.

------
ergot
Powershell is very insecure and is heavily abused by potential attackers as
it's more flexible than CMD.exe. Of course, arguing about CMD.exe vs PS.exe is
pointless, but it still needs to be argued.

There has been a recent spate of talks in Blackhat conf. and other confs,
about the versatility of PS.exe, how it is used to perform persistence in
comparably little characters, or lines of script than CMD.exe

Some of my Win10 deployments even contain a script which silently disables
PS.exe in the installation, and removes _every_ reference to that executable
in the registry. There are a few cases where I caught PS.exe re-spawning
itself when a Win10 update arrives, so a PS-free deployment is hard to
enforce.

~~~
gecko
I'm really confused here. What attack vectors apply to PowerShell, but _not_
to a situation where I can invoke cmd.exe? I can tell PowerShell to only run
signed scripts, and specify what signatures to honor, which is more than I can
do with either cmd.exe or WSH. You're citing compactness of scripts, but a
straight-up binary would be more compact still. I think I'm missing something
pretty basic here.

~~~
ergot
> I think I'm missing something pretty basic here

I'm referring to something like Powersploit
[https://github.com/PowerShellMafia/PowerSploit/](https://github.com/PowerShellMafia/PowerSploit/)

Which is a _post_ exploitation tool. Assuming you have a payload in Windows
ready to execute, one typically wants to leverage tools already in Windows
itself, like Powershell, which can make rootkits and other payloads have a lot
less footprint, and make them difficult to spot using heuristics. Most crap
payloads are actually easy to spot because their payload is massive.

Essentially my point is that you don't want to make it easy for attackers. For
context, one would _not_ want Powershell installed on 1000 Windows 10
installations.

I happen to get paid good money for deploying Win10 kiosks in different
offices in my area and Powershell is one of many tools I routinely remove from
Windows to decrease the attack surface in Win

