Baran Topal

Baran Topal


May 2024
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories


pass parameters with powershell

baranbaran

There are various ways to pass http parameters with powershell.

This powershell script would open up a browser page:


$url = "http://localhost:59578/plugin/foo/baz/importDataFromExcel?path=DummyCustomerData.xlsx"
start-process $url

However, the authentication is one important aspect to underline and must be provided if needed to browse the path:


$url = "http://localhost:59578/plugin/foo/baz/importDataFromExcel?path=DummyCustomerData.xlsx"
$IE=new-object -com internetexplorer.application $IE.navigate2($url)
$IE.visible=$true
$IE.Document.getElementById(“UsernameElement”).value = $Username
$IE.Document.getElementByID(“PasswordElement”).value=$Password
$IE.Document.getElementById(“SubmitElement”).Click()