title: Invoke-WebRequest is not recognized as the name of a cmdlet Windows 7 Powershell
body: <p>How can I use this script on Windows 7 PowerShell?</p>
  
  <pre><code>$IE = new-object -com internetexplorer.application
  $go = (Invoke-WebRequest –Uri ‘c:\link.html’).Links.href  
  $IE.navigate($go)
  $IE.visible=$true
  start-sleep 5
  $word=$go = (Invoke-WebRequest –Uri ‘c:\word.html’).Links.href 
  $Link = $IE.Document.getElementsByTagName("span") | ? {$_.InnerHTML -eq "$word"}
  $word2=$go = (Invoke-WebRequest –Uri ‘c:\word2.html’).Links.href 
  $ie.Document.getElementsByTagName("$word2").item(0).click()
  </code></pre>
  
  <p>After I run this script I get this error: </p>
  
  <pre><code>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:7 char:29
  +     $go = (Invoke-WebRequest &lt;&lt;&lt;&lt;  –Uri ‘http://lapfix.ir/link.html’).Links.href  
      + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  
  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 t
  hat the path is correct and try again.
  At line:12 char:31
  + $word=$go = (Invoke-WebRequest &lt;&lt;&lt;&lt;  –Uri ‘http://lapfix.ir/word.html’).Links.href 
      + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  
  Cannot find an overload for "getElementsByTagName" and the argument count: "1".
  At line:13 char:42
  + $Link = $IE.Document.getElementsByTagName &lt;&lt;&lt;&lt; ("span") | ? {$_.InnerHTML -eq "$word"}
      + CategoryInfo          : NotSpecified: (:) [], MethodException
      + FullyQualifiedErrorId : MethodCountCouldNotFindBest
  
  You cannot call a method on a null-valued expression.
  At line:14 char:12
  + $Link.click &lt;&lt;&lt;&lt; ()
      + CategoryInfo          : InvalidOperation: (click:String) [], RuntimeException
      + FullyQualifiedErrorId : InvokeMethodOnNull
  </code></pre>
  
  <p>I think the error is saying can't use <code>Invoke-WebRequest</code> on Windows 7. Why would that be?</p>