Open Browser with Powershell

I want to use Powershell to open the browser(IE).
I don’t want to use an open browser.

I entered the command as above.
There was an error. I want to know the reason.

1 Like

Hi,@yekho
It is recommended that you use Start Process, write the path of IE above, and write your URL as a parameter below
Regards.

openIE_withPowershell.zip (1.9 KB)

Hi,
Please find the attached workflow file.

I wish it works…mark as solution if it works

1 Like

Thanks, @Venugopal24

The process runs fine.
But, I want a maximize browser.

HI,
can you please replace the below code in ‘Invoke Power Shell’ activity and try

"Function maxIE
{
param($IE)
$asm = [System.Reflection.Assembly]::LoadWithPartialName(‘System.Windows.Forms’)

$screen = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds
$IE.Width = $screen.width
$IE.Height =$screen.height
$IE.Top =  0
$IE.Left = 0

}
$IE=new-object -com internetexplorer.application
$IE.navigate2(‘www.microsoft.com’)
$IE.visible=$true
maxIE $IE"

Mark as solution if it works

Thank you

1 Like

Thank you so much!
It works very well.

Sorry, I don’t understand

You can check by replacing the above code in my workflow which I shared you before.
(or)
uses the above code in your workflow by changing your URL name in the place of 'www.microsoft.comopenIE_withPowershell.zip (2.0 KB)

Find the updated file
Mark as solution if it helps