title: Creating Zip files using PowerShell
body: <p>I have these below files at a location C:\Desktop\Mobile.</p>
  
  <pre><code>    Apple_iphone6.dat
      Apple_iphone7.dat
      Samsung_edge7.dat
      Samsung_galaxy.dat
      Sony_experia.dat
      Sony_M2.dat
  </code></pre>
  
  <p>I need to create a script that writes the similar files into a single zip. So files Apple_iphone6.dat and Apple_iphone7.dat must be into single zip.
  So the final zip files created would be:</p>
  
  <pre><code>Apple_Files_Timestamp.zip
  Samsung_Files_Timestamp.zip
  Sony_Files_Timestamp.zip
  </code></pre>
  
  <p>I tried this </p>
  
  <pre><code>Get-ChildItem C:\Desktop\Mobile -Recurse -File -Include *.dat | Where-Object { $_.LastWriteTime -lt $date } | Compress-Archive -DestinationPath C:\Desktop\Mobile
  </code></pre>
  
  <p>But it gives me error 'Compress-Archive' is not recognized as the name of a cmdlet.</p>
  
  <p>How can I get this code work?</p>