Author Posts

March 28, 2016 at 9:02 am

hello, i need a script that resets my portforward everytime i restart my pc (i dont know why but everytime my pc restarts the portforward resets)
this is my logon script

$username = "ziggo"
$password = "draadloos"
$router = ""
$ie = New-Object -com InternetExplorer.Application
while($ie.ReadyState -ne 4) {start-sleep -m 100}
start-sleep -s 3

$ie.Document.getElementsByName('loginUsername').value = '$username'

$ie.Document.getElementsByName('Password').value = '$password'


i changed getElementsByName part to nearly everything i can come up with, no succes

logon site html:

March 28, 2016 at 10:46 am

You're using single quotation marks. That means $username and $password will be passed as literals. If you use double quotes, the variables will be replaced with their contents.

March 29, 2016 at 9:42 am

didnt really matter since it didnt even fill it in, but thanks anyways.
heres a screenshot of powershell (too lazy to cut out rest, sorry)
and yes i edited 'loginusername' with double quotes, still no success