Invoke-WebRequest PowerShell Command through AWS System Manager
Monday, October 6, 2025
This is a repost from my old blog. First posted in 10/25/2018.
I had a small issue with running Invoke-WebRequest through Amazon AWS System Manager. Somehow it doesn't seem to load the module properly.
I ended up replacing:
Invoke-WebRequest -Uri <url>
with:
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadString(<uri>)
which works perfectly for my case.