トップ回答者
オブジェクトのメンバー名と値列挙について

質問
-
オブジェクトのメンバ名と値を列挙してファイルへ出力する方法についての質問です。
### test1.ps1 ###
$objIe = New-Object -com InternetExplorer.Application
$objIe.Navigate("http://www.google.co.jp/")
do{ Start-Sleep -m 1 } until ($True -ne $objIe.Busy -and 4 -eq $objIe.ReadyState)
$objIe
$objIe.Document
$objIe.Quit()
#################test1.ps1 を行うと、$objIe と $objIe.Document のメンバ名と値が画面に表示されます。
この内容をテキストファイルへ出力したいです。そこで### test2.ps1 ###
$objIe = New-Object -com InternetExplorer.Application
$objIe.Navigate("http://www.google.co.jp/")
do{ Start-Sleep -m 1 } until ($True -ne $objIe.Busy -and 4 -eq $objIe.ReadyState)
(([String]$objIe)+"`r`n"+([String]$objIe.Document)) | Out-File tmp.log
$objIe.Quit()
#################を行うと
### test2.ps1 の結果 ###
System.__ComObject
mshtml.HTMLDocumentClass
########################という結果です。(不本意)
↓一時ファイルを介してみると、### test3.ps1 ###
$tmpfile1="tmp.log"
$objIe = New-Object -com InternetExplorer.Application
$objIe.Navigate("http://www.google.co.jp/")
do{ Start-Sleep -m 1 } until ($True -ne $objIe.Busy -and 4 -eq $objIe.ReadyState)
$objIe | Out-File $tmpfile1
$str1=[System.IO.File]::ReadAllText($tmpfile1).Trim()
$objIe.Document | Out-File $tmpfile1
$str1=$str1+"`r`n`r`n"+[System.IO.File]::ReadAllText($tmpfile1).Trim()
$str1 | Out-File ie.log
$objIe.Quit()
Remove-Item $tmpfile1
###################意図する結果が ie.log に保存されました。test3.ps1 の方法でも良いのですが、できれば一時ファイルを使わずに処理したいです。
一時ファイルを使わずに test3.ps1 と同じ結果を得る方法を、教えてください。環境 Windows XP Professional SP3 , Powershell 2.0, IE 8.0