I've run into this a few times, and it seems to only occur when performing a POST or PUT via Invoke-RestMethod. My GETs via Invoke-RestMethod tend to work as expected. You can try to specify -maximumredirection ## (default value is 5) to get around this, though I'm not sure if it'll work - can't remember if I fiddled with this or not. I kludged my scripts to point directly to the shard I'm on - n426.meraki.com/api/v1/. It's not recommended, and I'm sure this will bite me at some point.
... View more