SOSidb
SOSidb

Reputation: 574

Launching Internet Explorer from a PowerShell script

I’ve put together some PS code that does the following inside of a larger PS script:

Everything seems to work fine, except that after this code runs, it shows the number 24 in the PowerShell window (I am launching PS from the command line). Can anyone tell me why 24 is being displayed when I run the above code and is it possible to stop it from being displayed?

Upvotes: 1

Views: 3850

Answers (1)

Bill_Stewart
Bill_Stewart

Reputation: 24535

This is the return value from the ShowWindow function. To ignore the result, use:

$type::ShowWindow($ie.hwnd, 3) | out-null

Upvotes: 1

Related Questions