Invoke-RestMethod

While I always make every effort to figure things out myself, I have to say, after hours of web searching, help files, and books, I am unable to resolve the Invoke-RestMethod issue.  As a last resort, here is my first post.

When I run the Invoke-RestMethod, it returns the sites entire code.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <input class="SYN_LNN" type="label" unselectable="on" value="2" /><input class="SYN_BCH" id="syn_ctrl2" role="button" type="label" unselectable="on" value="-" /> <HTML> <input class="SYN_LNN" type="label" unselectable="on" value="3" /><input class="SYN_BCH" id="syn_ctrl3" role="button" type="label" unselectable="on" value="-" />

<HEAD> <script language="JScript" type="text/Javascript" src="/Reports/js/ReportingServices.js"></script>

However, I don't have that issue with other sites. More than happy to figure things out for myself, if someone can point me in the right direction.  Recommend books, sites, link, anything.  Much appreciated.

February 2nd, 2015 12:34pm

We have no idea wha tyou are doing and the HTML looks broken.

Many sites cannot be queried using that CmdLet.  Try Invoke-WebRequest instead,

Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2015 3:49pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics