1. [Wiki](https://feex.it/wiki/)
2. [进程](https://feex.it/wiki/process/)
3. [应用程序进程](https://feex.it/wiki/process/application/)
4. pwsh.exe

# pwsh.exe

应用程序进程: Microsoft Corporation

目录搜索词 pwsh, powershell 7, powershell core

Windows, 应用程序

PowerShell 7。它是跨平台的 pwsh 主机，通常位于 Program Files\PowerShell\7 下。它不是 Windows PowerShell 5.1 (powershell.exe)。

## 您需要了解的内容

pwsh 是 PowerShell 7，而不是 Windows PowerShell 5.1。

pwsh.exe 是 PowerShell 7，作为并行主机从 Microsoft 安装。powershell.exe 仍然是位于 System32\WindowsPowerShell 中的 Windows PowerShell 5.1。Windows Terminal 和 OpenConsole 仅绘制窗口。结束 pwsh 不会移除 5.1。

- **安全吗？**: 请检查正在运行的文件的路径、签名和发布者。仅凭名称无法确定安全性。

  **与 powershell.exe 相同吗？**: 不同。那是 Windows PowerShell 5.1

  **我可以结束它吗？**: 该 PowerShell 7 会话停止

Feex 表示

如果看到 pwsh，我会将其命令行解读为 PowerShell 7。我不会将 powershell.exe 视为相同的主机，也不会将仅限 7 版本的模块故障归咎于 conhost。

## 什么是 pwsh.exe？

pwsh 是 PowerShell 7，而不是 Windows PowerShell 5.1。5.1 主机保持为 powershell.exe。此文件是您安装的较新运行时。它不是 Windows Terminal。

## 它的作用是什么？

它运行 PowerShell 7 脚本和模块。某些 5.1 管理单元将无法在此处加载。它不绘制选项卡 UI (WindowsTerminal.exe)，也不是 cmd.exe。

## 为什么它在运行？

您打开了 PowerShell 7、设置为 pwsh 的 VS Code 终端，或者某个任务调用了此主机。仅装有 5.1 的电脑不会显示 Program Files\PowerShell\7 副本。

## 检查正在运行的实例

在 Windows PowerShell 中，此只读查询会列出此 PC 上匹配的进程 ID、创建时间和可执行文件路径。

`Get-CimInstance -ClassName Win32_Process | Where-Object { $_.Name -eq 'pwsh.exe' } | Select-Object ProcessId, ParentProcessId, CreationDate, Name, ExecutablePath | Format-List`

无结果或路径不可访问是不可判断的。受保护的进程可能会限制访问，并且进程 ID 会被重用。请将个人路径保留在本地。

使用 [文件身份指南](https://feex.it/wiki/l/zh-hans/software/system/verify-executable-path-signature/) 来比较签名和产品元数据。仅文件名无法确定安全性。

## 它安全吗？

宿主合法。脚本才是疑问所在

位于 Program Files\PowerShell 下受 Microsoft 签名的 pwsh 是 PowerShell 7。Temp 中的 pwsh.exe 则不是。安全性仍取决于父进程和 -Command 命令行。这仍然不是 powershell.exe。

将记录的位置与实际文件进行比较。熟悉的文件夹本身并不能确定身份。

`C:\Program Files\PowerShell\7\pwsh.exe`

- PowerShell 7 并行安装
- Windows PowerShell 5.1 为 System32\WindowsPowerShell\v1.0\powershell.exe
- 窗口可能是 Windows Terminal 或 OpenConsole

## 我可以结束它吗？

停止该 7 会话

结束 pwsh.exe 会终止 PowerShell 7。powershell.exe 5.1 可以保留。结束 WindowsTerminal.exe 仅会关闭选项卡 UI，不会关闭由任务启动的每个 7 主机。

## 我可以删除它吗？

卸载 PowerShell 7，保留 5.1

如果您想移除 pwsh，请从“应用”中卸载 PowerShell。请勿删除 System32\powershell.exe。请勿删除 System32。

## 它应该随 Windows 一起启动吗？

计划任务或配置文件可以启动 pwsh。那不是 5.1 主机，也不是名为 powershell.exe 的 Windows 默认程序。

## 测量资源使用情况

| CPU 和内存 | 比较同一 PID 和工作负载的几次观察结果。此条目没有独立测量的通用基线。 |
| ------- | ------------------------------------- |
| 磁盘和网络   | 将活动归因于实际进程和当前任务；仅文件名本身并不能确定预期的目标或传输量。 |

## 文件信息

| 可执行文件名称 | pwsh.exe                               |
| ------- | -------------------------------------- |
| 记录的安装路径 | C:\Program Files\PowerShell\7\pwsh.exe |
| 发布者     | Microsoft Corporation                  |
| 签名检查    | 检查实际文件；此条目不保证其证书身份。                    |

## 常见问题

### 仅限 5.1 的管理单元失败，他们却去修复 powershell.exe

此主机为 7。请安装 7 模块或运行 Windows PowerShell 5.1。不同的 exe，不同的库体系。

### 来自随机任务的隐藏 pwsh

读取 -File / -Command。7 主机仍属于 Microsoft。有效载荷在于命令行本身。这并不属于“Terminal 是恶意软件”。

## 故障排除

在进行任何破坏性更改之前先进行诊断。

### pwsh -v 对比 powershell.exe 中的 $PSVersionTable

7 从该文件输出。5.1 从 Windows PowerShell 输出。切勿混淆升级文档。

### 像对 5.1 一样检查父 PID

explorer 加上快捷方式代表是您操作的。Office 启动 pwsh 属于宏相关情况。切勿首先删除 7 的安装文件夹。

## 技术细节

技术细节

| 映像名称 | pwsh.exe                                |
| ---- | --------------------------------------- |
| 同胞进程 | powershell.exe (Windows PowerShell 5.1) |

## 检查运行中文件的身份标识

仅文件名无法确定安全性。请验证实际路径、签名和产品身份。

## 相关内容

这些实体与本文相关联。每个链接上均显示类型。

[powershell.exe: 应用程序进程](https://feex.it/wiki/l/zh-hans/process/powershell.exe/)[cmd.exe: 应用程序进程](https://feex.it/wiki/l/zh-hans/process/cmd.exe/)[WindowsTerminal.exe: 应用程序进程](https://feex.it/wiki/l/zh-hans/process/windowsterminal.exe/)[检查可执行文件路径和数字签名: 指南](https://feex.it/wiki/l/zh-hans/software/system/verify-executable-path-signature/)[阅读任务管理器并比较进程活动: 指南](https://feex.it/wiki/l/zh-hans/software/system/how-to-read-task-manager/)[应用程序进程: 类别](https://feex.it/wiki/process/application/)

## 来源与验证

记录的来源标签：August 2026。此标签并不代表已完成独立验证。 [我们的研究方式](https://feex.it/wiki/research/).

- [Microsoft Learn: PowerShell 7 与 Windows PowerShell ](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell)· pwsh.exe 是 PowerShell 7，powershell.exe 是 5.1
- [Microsoft Learn: 在 Windows 上安装 PowerShell ](https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-windows)· 典型路径是 Program Files\PowerShell\7
- [Foxhole 进程图谱 ](https://foxhole.feex.it/)· Windows PC 上的第一方采集样本。非实验室基准测试。
- [Microsoft Sysinternals: Sigcheck ](https://learn.microsoft.com/en-us/sysinternals/downloads/sigcheck)· 说明如何检查文件签名。此参考资料并不代表能确定特定运行中文件的身份或安全性。
- [Microsoft: Get-CimInstance ](https://learn.microsoft.com/en-us/powershell/module/cimcmdlets/get-ciminstance)· 只读本地进程查询方法。
- [Microsoft: Win32_Process 属性 ](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-process)· 记录进程 ID、可执行文件路径、创建日期和父 ID 重用。

## 这篇文章有用吗？

回答"是"或"否"即可。如果您愿意，可以选择一个原因，或添加一段简短附言。

速览

本页面的简要身份信息。详细规格、来源和完整内容保留在正文中。

- **类型**: 应用程序进程

  **发布者**: Microsoft Corporation

  **可执行文件**: pwsh.exe

  **典型路径**: C:\Program Files\PowerShell\7\pwsh.exe

  **记录上下文**: Feex Wiki 参考条目

记录的来源状态：Feex 已审核: 记录的来源标签：August 2026。此标签并不代表已完成独立验证。

---

Source: [Canonical Feex Wiki page](https://feex.it/wiki/l/zh-hans/process/pwsh.exe/)

[Developer guide](https://feex.it/wiki/developers/) | [API policy](https://feex.it/developers/api-policy/) | [Agent guidance](https://feex.it/wiki/llms.txt)
