Powershell实现捕获系统内置EXE程序的异常 您所在的位置:网站首页 powershellexe Powershell实现捕获系统内置EXE程序的异常

Powershell实现捕获系统内置EXE程序的异常

#Powershell实现捕获系统内置EXE程序的异常| 来源: 网络整理| 查看: 265

支持所有版本。 当你运行控制台EXE命令,如robocopy.exe, ipconfig.exe或类似命令。你可以用Powershell获得他们引起的错误: 代码如下: try {     $current = $ErrorActionPreference     $ErrorActionPreference = ‘Stop’     # this will cause an EXE command to emit an error     # (replace with any console-based EXE command)     net.exe user nonexistentU



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有