title: Pass Datetime to powershell script
body: <p>In a powershell script, I try to call another script with two datetime parameters.</p>
  
  <p>Parent script :</p>
  
  <pre><code>$startDate = "02/05/2015 19:00"
  $endDate = "02/06/2015 14:15"
  
  Invoke-Expression "C:\MoveAndDeleteFolder.ps1 -startDate $startDate -endDate $endDate"
  </code></pre>
  
  <p>Child script :</p>
  
  <pre><code>param
  (
      [Datetime]$startDate,
      [Datetime]$endDate
  )
  
  $startDate| Write-Output
  </code></pre>
  
  <p>Result :</p>
  
  <p>Tuesday February, the 10th 2015 <strong>00:00:00</strong></p>
  
  <p>-> The time is lost !</p>
  
  <p>Does anybody know why ?</p>