Unable to open Firefox using Powershell

Hi,

I am new to power shell. I have to open a browser that is loacted on my desktop using Power shell.
I tried giving the below command but it throws an error.PowerShellError

Hi ,

use below command in invoke powershell activity

Start-Process -FilePath 'C:\Program Files\Mozilla Firefox\firefox.exe'

.
change the path accordingly.

1 Like

Hi @pooja.pakanati

You can also open this using open application

Or is the powershell mandatory?

Thanks

Thank you it Worked!

1 Like

I cannot do an Open Application while the Browser is in Remote Server… Thank you!

Can i also change the Users?
C:\Users%USERPROFILE%\Desktop\Browsers\PROD_Mozilla Firefox?

Hi

You need to create a credentials object with the proper ones in it, and then run the app you want with it like this:

$username = "username"
$password = "password"
$credentials = New-Object System.Management.Automation.PSCredential -ArgumentList @($username,(ConvertTo-SecureString -String $password -AsPlainText -Force))

Start-Process filefullpath.exe -WorkingDirectory path_here -Credential ($credentials)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.