Get HTTP Status from InternetExplorer Com Object

I am struggling to get Status of page that I am trying to get using InternetExplorer COM objects method Navigate.

I found that there is event NavigateError and have saw some overrides examples for VBS ( and for Perl ( but how to override this method in IE???

Here sample code :

$ie = New-Object -comobject InternetExplorer.Application
$ie.visible = $true
while( $ie.busy){Start-Sleep 1}

Because of Complex Login logic(adfs, JavaScript redirect…) I can’t use any of other nicer approaches like Invoke-WebRequest, HTTPRequest, WebClient or simillar.

Look for Invoke-WebRequest as an alternate way, unless you really the COM object.