title: execute/invoke a local ps1 file using winrm
body: <p>i had this issue for days now. Done and researched everything pertaining to executing a powershell script on your local machine using winrm.</p>
  
  <p>My goal is to execute these ps1 scripts from my local to a target remote machine. winrm is already configured and working with its basic commands, but i cannot find anything to run a powershell script (*.ps1) using winrm.</p>
  
  <p>something like </p>
  
  <pre><code>winrm {execute ps1 file} -r:http://&lt;IPaddress&gt;:5985 -auth:basic -u:'username' -p:'password' -encoding:utf-8
  </code></pre>
  
  <p>Any help and suggestions are much appreciated.</p>
  
  <p>Thank you guys!</p>