title: cmd call to powershell "you must provide a value expression on the right hand side of the '-' operator"
body: <p>Before I go any further, my experience with Powershell amounts to only 2 days. </p>
  
  <p>I am trying to call a powershell script from the command line with four parameters added to the command. The powershell script simply cleans a CSV file and makes a copy of the file at every stage of cleaning.</p>
  
  <p>The variables <code>a</code>, <code>b</code>, <code>c</code> and <code>d</code> in the script relate to the new filenames (including the full address).</p>
  
  <p>PowerShell Script</p>
  
  <pre><code>param(
    [string]$a,
    [string]$b,
    [string]$c,
    [string]$d
  
  
   )
  
  
  
  Get-Content $a | ForEach-Object { $_ -replace """""""""""","""""" } | Set-Content $b -Force
  Get-Content $b | ForEach-Object { $_ -replace """""""","""" } | Set-Content $c -Force
  Get-Content $c | ForEach-Object { $_ -replace """""","" } | Set-Content $d -Force
  </code></pre>
  
  <p><strong>Command Script</strong></p>
  
  <p>The command script below is what I am trying to run in <code>cmd</code> (note: I have taken out the real addresses).</p>
  
  <pre><code>powershell.exe '\\somefileaddress\CleanData.ps1' 
  -a "\\someaddress\DrFA-C.csv" 
  -b "\\someaddress\DrFA-C_2.csv" 
  -c "\\someaddress\DrFA-C_3.csv"
  -d "\\someaddress\DrFA-C_4.csv"
  </code></pre>
  
  <p>The error message i am getting is:</p>
  
  <blockquote>
    <p>You must provide a value expression on the right hand side of the '-' operator.</p>
  </blockquote>