drliuhuan/dsh-plugin-pwsh7 ↗★ 0
dsh-plugin-pwsh7
将 shell 工具路由至 PowerShell 7 的沙箱执行器 Windows 用户必备,适合需要安全执行 PowerShell 脚本的任务
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:drliuhuan/dsh-plugin-pwsh7說明文件
閱讀完整 README ↗Usage
The model-facing shell_router tool:
| Action | What it does |
|---|---|
status (default) | Resolved PowerShell 7 path and version, config file, current sandbox policy, shipped-package resolution. |
diagnose | Runs real PowerShell 7 commands under the current sandbox policy (version + workspace write) and reports exit codes, stdout/stderr, denial/runner-failure classification, and concrete hints. |
install | Ensures PowerShell 7 exists. method: "auto" (default) prefers the per-user portable zip, then falls back to winget; portable/winget force one strategy. Existing working installations are reused instead of downloading again. |
Explicit paths
Resolution order for the pwsh executable:
DSH_PWSH_PATHenvironment variablepwshPathin%LOCALAPPDATA%\dsh\pwsh7\config.json%ProgramFiles%\PowerShell\7\pwsh.exe%LOCALAPPDATA%\dsh\pwsh7\powershell7\…\pwsh.exe(portable installs, newest first)%LOCALAPPDATA%\Programs\PowerShell\7\pwsh.exe- every
PATHentry %LOCALAPPDATA%\Microsoft\WindowsApps\pwsh.exe(Store alias)%ProgramFiles(x86)%\PowerShell\7\pwsh.exe
The stock pwsh-sandbox row still accepts its official pwshPath config field; an explicit config
value takes precedence over automatic detection.
Config file
%LOCALAPPDATA%\dsh\pwsh7\config.json:
{
"version": 1,
"pwshPath": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"installed": {
"pwsh": {
"path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"version": "7.6.7",
"method": "existing",
"at": "2026-10-17T00:00:00.000Z"
}
},
"updatedAt": "2026-10-17T00:00:00.000Z"
}