Summary of the new feature / enhancement
Coming from Stackoverflow question: Extract text from html with powershell
And probably ties into #4553 (which I simply don't fully understand)
Just like Member-Access Enumeration for native .Net and PowerShell objects, I would expect to be able to enumerate ComObject members (System.MarshalByRefObject?) in a similar way:
$String = '<div>Some text</div>'
$Unicode = [System.Text.Encoding]::Unicode.GetBytes($String)
$Html = New-Object -Com 'HTMLFile'
$Html.write($Unicode)
$Html.getElementsByTagName('div').innerText
Expected
Actual
No output
Workarrounds
@($Html.getElementsByTagName('div')).innerText
$Html.getElementsByTagName('div') |% { $_.innerText }
Summary of the new feature / enhancement
Coming from Stackoverflow question: Extract text from html with powershell
And probably ties into #4553 (which I simply don't fully understand)
Just like Member-Access Enumeration for native .Net and PowerShell objects, I would expect to be able to enumerate ComObject members (
System.MarshalByRefObject?) in a similar way:Expected
Actual
No output
Workarrounds