Invoke WebRequests via Powershell

Invoke WebRequests via Powershell

It’s quite simple to invoke WebRequests via Powershell if you have Powershell Version 3.0 or higher:

Invoke-WebRequest "https://arminreiter.com"

If you have Powershell Version 2.0 or 1.0 , you’ll receive the following error:

invoke-webrequest : The term ‘invoke-webrequest’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:18 + invoke-webrequest <<<< “http://www.codehollow.com” + CategoryInfo : ObjectNotFound: (invoke-webrequest:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException