Invoke-WebRequest
i use powershell 5.0 in windows 10. on page https://technet.microsoft.com/en-us/library/hh849901(v=wps.640).aspx ,
example 2 uses following logon facebook.com. rule use -uri other websites? if the first invoke-webrequest in example 2 has logon uri https://www.web.com/en/site1/logon.html , uri in the second invoke-webrequest ? thanks
$r=invoke-webrequest -uri ("https://www.facebook.com" + $form.action) -websession $fb -method post -body $form.fields
hi lan,
thanks post.
for first question asked, rule use invoke-webrequest -uri, parameter pass -uri supports http, https, ftp, , file values, can use specify website link address.
for second question, uri in second invoke-webrequest is: "https://www.facebook.com/login.php?login_attempt=1&lwv=100" login page of facebook.
you can check output of $form.action, "/login.php?login_attempt=1&lwv=100".the uri add www.facebook.com. by way, , issue post powershell issue, in order receive better can post problem on powershell forum.
best regards,
elaine
please remember mark replies answers if , unmark them if provide no help. if have feedback technet subscriber support, contact tnmff@microsoft.com.
Windows Server > Management
Comments
Post a Comment