title: Powershell - How to use import-csv for SwitchParameter
body: <p>I have a custom cmdlet written in C# which takes <code>SwitchParameter</code> as one of its arguments, I want to execute my cmdlet using import-csv, how should I write my csv so that I am able to pass correct <code>SwitchParameter</code> value?</p>
  
  <p>I have tried True, False, 0 , 1, with and without quotes in CSV however they dont seem to work, I always get false in my code</p>
  
  <pre><code>[Parameter(Mandatory = false, ValueFromPipelineByPropertyName=true)]
  public SwitchParameter Enable { get; set; }
  </code></pre>
  
  <p>I am running Powershell version 2.0, the command I want to execute is :</p>
  
  <pre><code>Import-Csv c:\data.csv | Add-MyData
  </code></pre>