title: How to use wget in PowerShell console with username and password
body: <p>I have seen couple of answers on SO like <a href="https://stackoverflow.com/questions/35433151/powershell-a-positional-parameter-cannot-be-found-that-accepts-arguement-xxx">this</a> and <a href="https://stackoverflow.com/questions/14595554/what-is-the-correct-wget-command-syntax-for-https-with-username-and-password">this</a>. But I always get some error similar to the following.</p>
  
  <p>Not sure what am I doing wrong. I tried with the following variations, but all giving similar error. Please help.</p>
  
  <pre><code>wget --user "My.UserName@gmail.com" --password "MyWhatEver@pas$w0rd" https://bitbucket.org/WhatEver/WhatEverBranchName/get/master.zip
  wget --user="My.UserName@gmail.com" --password="MyWhatEver@pas$w0rd" https://bitbucket.org/WhatEver/WhatEverBranchName/get/master.zip
  wget --user='My.UserName@gmail.com' --password='MyWhatEver@pas$w0rd' https://bitbucket.org/WhatEver/WhatEverBranchName/get/master.zip
  wget --user My.UserName@gmail.com --password MyWhatEver@pas$w0rd https://bitbucket.org/WhatEver/WhatEverBranchName/get/master.zip
  </code></pre>
  
  <pre>Invoke-WebRequest : A positional parameter cannot be found that accepts argument
  '--password=MyWhatEver@pas$w0rd'.
  At line:1 char:1
  + wget --user='My.UserName@gmail.com' --password='MyWhatEver@pas$w0rd'  ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand</pre>