Sounds to me like you're looking for something like this:
$app = New-Object -COM 'Shell.Application'
$app.Windows() | Select-Object LocationURL
AFAICS the window objects don't have a title property, but you can get that information from Get-Process
via the window handle ID:
function Get-WindowTitle($handle) {
Get-Process |
Where-Object { $_.MainWindowHandle -eq $handle } |
Select-Object -Expand MainWindowTitle
}
$app = New-Object -COM 'Shell.Application'
$app.Windows() |
Select-Object LocationURL, @{n='Title';e={Get-WindowTitle $_.HWND}}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…