Thursday, October 25, 2018

Invoke-WebRequest PowerShell Command through Amazon AWS System Manager

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.

No comments:

Post a Comment