drliuhuan/dsh-plugin-pwsh7 ↗★ 0

dsh-plugin-pwsh7

Windows DeepSeek Harness bundle that routes the pwsh tool to PowerShell 7, with per-user detection, automatic installation, and a sandbox-aware executor. Windows 用户必备,适合需要安全执行 PowerShell 脚本的任务

Package
dsh-plugin-pwsh7
Compatibility
Unverified
Version
0.1.1
License
MIT
Last updated
Oct 17, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:drliuhuan/dsh-plugin-pwsh7

Usage

The model-facing shell_router tool:

ActionWhat it does
status (default)Resolved PowerShell 7 path and version, config file, current sandbox policy, shipped-package resolution.
diagnoseRuns 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.
installEnsures 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:

  1. DSH_PWSH_PATH environment variable
  2. pwshPath in %LOCALAPPDATA%\dsh\pwsh7\config.json
  3. %ProgramFiles%\PowerShell\7\pwsh.exe
  4. %LOCALAPPDATA%\dsh\pwsh7\powershell7\…\pwsh.exe (portable installs, newest first)
  5. %LOCALAPPDATA%\Programs\PowerShell\7\pwsh.exe
  6. every PATH entry
  7. %LOCALAPPDATA%\Microsoft\WindowsApps\pwsh.exe (Store alias)
  8. %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"
}