title: Upload file form powershell to asp.net
body: <p>I have an asp.net mvc application, which allows to upload company structure using CSV file. I was asked about possibility to automate this function using powershell script.Creating CSV in powershell is easy, but I do not have an idea how upload to asp.net. </p>
  
  <p>My first choice was to use WebClient, but I have problem with authentication - in mvc we are using forms authentication.I read <a href="http://channel9.msdn.com/Forums/TechOff/162017-Using-WebClient-to-enter-Form-based-Auth-system-How" rel="noreferrer">here</a> that it is possible, but if my login form changes I will have to send updated script to client. I would like to omit mange code on client side. </p>
  
  <p>The second option is to crate separate controller and use in it authorization token, but I look like "inventing a wheel again", because I would need to write all code responsible for authentication.</p>
  
  <p>Can I improve one of above options? Or maybe there is a better choice?</p>