Run Edge and Hide the browser

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
liankin128
Posts: 4
Last visit: Fri Mar 15, 2024 2:40 am
Has voted: 1 time

Run Edge and Hide the browser

Post by liankin128 »

Hello,
To let user access to a specific web site in the background, we use IE11 as below. I'd like do same thing with Edge as IE11 will reach end of support, however, Edge seems not support ComObject.
How should I change them ?

$InternetExplorer = New-Object -comobject 'InternetExplorer.Application'
$InternetExplorer.navigate("<URL>")
$InternetExplorer.Visible = $true
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Run Edge and Hide the browser

Post by jvierra »

You will need to post in an Edge forum as it is not doable using any of IE methods. Edge has a sort of API but I think Microsoft dropped hiding for security reasons.

Post in teh Edge Developer Forum as they should know.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Run Edge and Hide the browser

Post by Alexander Riedel »

start microsoft-edge:http://www.cnn.com

You say you want to hide it, but you set visible to true...
Alexander Riedel
SAPIEN Technologies, Inc.
liankin128
Posts: 4
Last visit: Fri Mar 15, 2024 2:40 am
Has voted: 1 time

Re: Run Edge and Hide the browser

Post by liankin128 »

Alexander Riedel wrote: Wed Sep 08, 2021 12:56 pm You say you want to hide it, but you set visible to true...

sorry, I copied wrong one. $false is correct one.
liankin128
Posts: 4
Last visit: Fri Mar 15, 2024 2:40 am
Has voted: 1 time

Re: Run Edge and Hide the browser

Post by liankin128 »

jvierra wrote: Wed Sep 08, 2021 12:29 pm You will need to post in an Edge forum as it is not doable using any of IE methods. Edge has a sort of API but I think Microsoft dropped hiding for security reasons.

Post in teh Edge Developer Forum as they should know.
Thank you. I will post in an Edge forum.
This topic is 2 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked