用命令启动 Windows 沙盒

运行 WindowsSandbox.exe 打开一次性隔离桌面,安全测试可疑文件和软件。

Windows沙箱命令行安全低风险
运行 `WindowsSandbox.exe`,即可启动一个干净的隔离 Windows 桌面,关闭后所有内容自动消失。

01命令

命令
$ WindowsSandbox.exe

02作用说明

Windows 沙盒会启动一个临时的 Windows 副本,在里面运行的软件接触不到真实系统,关闭后一切都会被丢弃。使用前需要先启用该功能(见要求里的 dism 命令),之后几秒即可启动,无需配置任何虚拟机。它最适合用来打开来历不明的附件或安装包。

03风险

风险低风险
使用条件Windows 10/11 Pro, Enterprise or Education; enable the feature first with `dism /online /enable-feature /featurename:Containers-DisposableClientVM`.
!注意: 沙盒内的文件不会保存——关闭沙盒时全部删除。还需在 BIOS/UEFI 中开启虚拟化。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • netsh
    Microsoft Learn · vendor-doc · 2026-09-17
    依据: Documents netsh WLAN commands including `netsh wlan show profile name=... key=clear` and `netsh wlan delete profile name=...`.
  • Windows Sandbox
    Microsoft Learn · vendor-doc · 2026-09-17
    依据: Windows Sandbox provides a disposable desktop environment started by running WindowsSandbox.exe.

最后验证: 2026-09-18 · 分类: 安全与隐私

06相关方案