📜  PowerShell与CMD

📅  最后修改于: 2021-01-08 01:53:20             🧑  作者: Mango

PowerShell和CMD之间的区别

什么是命令提示符?

命令提示符是命令行外壳程序,其基于1980年代Microsoft磁盘操作系统(MS-DOS)。它是一个简单的win32应用程序,可帮助用户使用基于文本的命令和参数与Windows操作系统进行交互。

命令提示符具有内置命令来运行各种任务,其中大多数可以以管理员身份执行。

命令提示符正式称为Windows命令处理器,但有时也称为CMD提示符或命令外壳,甚至通过其文件名cmd.exe也称为。 Therese Stowell于1987年12月为Windows NT开发了第一个CMD版本。几乎所有版本的Windows操作系统都可以使用它。

什么是PowerShell?

PowerShell是命令提示符的更高级版本。它用于执行ping或copy之类的外部程序,并自动执行cmd.exe无法访问的不同系统管理任务。

它是为系统管理员设计的基于任务的自动化命令行外壳和相关脚本环境。它建立在.NET框架上。它是比cmd强大的命令行解释器,可以解释PowerShell和Batch命令。

PowerShell Command Prompt (CMD)
1. It is the automated task-based command-line interface and associated scripting language based on the .NET framework. 1. It is the default command-line interpreter for the Microsoft Windows operating system.
2. It can interpret both batch and PowerShell commands. 2. It can interpret only batch commands.
3. It is used to control and automate the applications and Windows operating system on a Windows server. 3. It is used to execute the given commands on the console, which can be used to debug the problem.
4. The output generated by the PowerShell is not just a stream of characters but a collection of objects. 4. The output generated by the command prompt is just a stream of characters(text).
5. It is both a shell and scripting environment which supports the creation of large files for managing the windows operating system. 5. It is just a shell system, which allows a user to do only easy and basic scripts for the execution of the batch file.