在Powershell中有两个特殊的关键字,就是你使用在循环中的break和co […]
每日归档: 2014年6月26日
Powershell中获取一个Windows环境变量,简单一点就是使用“env: […]
Powershell使用环境变量
如果自己写函数动态地去执行一些脚本块或者脚本文件,那么捕获到异常时行号和列号信息 […]
PowerShell异常发生的行号和列号

在启动PowerShell中调用Selenium启动IE驱动器InternetExplorerDriver遇到错误:Unexpected error launching Internet Explorer. Protected M
ode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled)
for all zones. (NoSuchDriver)
Unexpected error launching Internet Explorer.
如题:怎么在 powershell.exe -File “abc.p […]
怎么在 powershell.exe -File “abc.ps1” 之前调用 Set-PSDebug
像Get-FanBingbing这样的异常,是因为命令不存在,确切来讲属于语法错误,级别比较高被trap到了。但是像目录找不到这样的异常,相对而言级别比较低,默认不能捕获到,除非显示指定ErrorAction为stop。