11.1. Shell Hosts
The powershell.exe program is a console application. That fact, combined with previous experience with different shells, may lead us into thinking about command-line shells as console applications. That may not always be true. For example, the official PowerShell development guidelines explicitly state that no code should assume it is running in a console environment and that it should never ever output text directly to the console. Why is that? One of the design considerations for the shell was that it has to be easy to embed a shell in any application—and that really means any application, not just console ones. Applications that embed PowerShell are called shell hosts, and they can be all sorts of applications—GUI tools, ...
Get Pro Windows PowerShell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.