0

I am trying to get a list of users from invoke-restmethod but there is a limit of 100 users so only 100 of them come back.I researched a little bit and found out that a -followrellink parameter can be used with the invoke-restmethod but this parameter is avaialable only in 7.1 and not in 5.1 so i am not able to come up with a way around this. LMK if u need anything. P>S: this is my first question ever asked on this site and i am new to powershell.

  • 1
    You have correctly identified that Window PowerShell 5.1 `Invoke-RestMethod` does not have a `-FollowRelLink` parameter. It appears to have been introduced in PowerShell Core 6.0. The most long term benefit might come from getting onto PowerShell Core; the current stable version is 7.2.2. If you must use Windows PowerShell 5.1, released 5.5 years ago, this might be of interest. https://github.com/PowerShell/PowerShell/issues/5526#issuecomment-346425210 – lit Mar 18 '22 at 16:01
  • Hey thanks for the solution, i tried doing it but the api that i am using is not giving any next url in its header response i am just gonna use version 7 and the follow rel link. Thanks for the help – VivekGupta Mar 22 '22 at 13:23

0 Answers0