Powershell 返回打开浏览器的 URL
(New-Object -comObject Shell.Application).Windows() `
| where {($_.FullName -ne $null) -and ($_.FullName.toLower().EndsWith("iexplore.exe")) } `| foreach { $_.locationURL }
彻底退出。
foreach { $_.quit()}
本文介绍了一段Powershell脚本,该脚本能够获取当前正在运行的Internet Explorer浏览器窗口中的URL。通过使用ComObjectShell.Application对象,可以列举出所有活动的IE实例及其对应的网页地址。
Powershell 返回打开浏览器的 URL
(New-Object -comObject Shell.Application).Windows() `
| where {($_.FullName -ne $null) -and ($_.FullName.toLower().EndsWith("iexplore.exe")) } `
彻底退出。
foreach { $_.quit()}
1705
547
1088

被折叠的 条评论
为什么被折叠?