PowerShell is a command line shell and scripting environment released by Microsoft that allows command line users and script writers to take advantage of the power of the .NET Framework; it introduces many very useful new concepts that further Expands the knowledge gained and scripts created by users in the Windows Command Prompt and Windows Script Host environments.
The operating environment of this tutorial: Windows 10 system, Dell G3 computer.
What is powershell
The full name of powershell is Windows Power Shell, which is a command line shell and scripting environment released by Microsoft. Command line users and script writers can take advantage of the power of the .NET Framework.
It introduces many very useful new concepts that further expand the knowledge you gain and the scripts you create in the Windows Command Prompt and Windows Script Host environments.
PowerShell is a modern command shell that includes the best features of other commonly used shells. Unlike most shells, which only accept and return text, PowerShell accepts and returns .NET objects. The shell includes the following features:
Reliable command line history
Tab autocompletion and command prediction (see about_PSReadLine)
Support command and parameter aliases
Pipe for chaining commands
In-console help system, Similar to Unix man page
The difference between powershell and cmd
1. Resource occupation
First, let us take a look at the resource usage of Cmd and PowerShell. When we run Cmd, it only takes up less than 1M of memory, which is almost negligible.
When using PowerShell, it takes up about 20M of memory, which is almost 40 to 50 times different. It can be seen from here that if your computer is older and has lower performance, you can undoubtedly get higher fluency by using Cmd.
2. Interface
When we use Cmd, all characters are of the same color and syntax is not high. Bright.
However, if you are using PowerShell, the keywords will be highlighted and the error message will be displayed in red, which is really beautiful.
3. Typesetting
When we use Cmd to run some more complex and time-consuming commands, feel free to drag the command When you resize the window, the content in the window can still remain the same, neat and beautiful.
#However, if you use PowerShell to execute the same command, the situation is not optimistic. If you quickly drag the command line window during the execution of a command, the Chinese characters in the window will appear overlapping, seriously affecting the reading experience.
4. Command support level
Cmd can only support traditional Windows commands and cannot use commands in the .net library. , and commands under Linux cannot be used.
But PowerShell is much more powerful in this regard. It not only perfectly supports traditional Windows commands and commands in the .net library, but also supports some commonly used Linux commands.
For more programming related knowledge, please visit: Programming Video! !
The above is the detailed content of What does powershell mean?. For more information, please follow other related articles on the PHP Chinese website!