title: How to use an array in a zip function using powershell?
body: <p>I am still pretty new to scripting and "programming" at all. if you miss any information here let me know.
  This is my working zip function:</p>
  
  <pre><code> $folder = "C:\zipthis\"
   $destinationFilePath = "C:\_archive\zipped"
  
     function create-7zip{
      param([string] $folder, 
      [String] $destinationFilePath)
      write-host $folder $destinationFilePath
      [string]$pathToZipExe = "C:\Program Files (x86)\7-Zip\7zG.exe";
      [Array]$arguments = "a", "-tzip", "$destinationFilePath", "$folder";
      &amp; $pathToZipExe $arguments;
      }
  
  Get-ChildItem $folder | ? { $_.PSIsContainer} | % {
       write-host $_.BaseName $_.Name;
       $dest= [System.String]::Concat($destPath,$_.Name,".zip");
       (create-7zip $_.FullName $dest)
       } 
  
  
  create-7zip $folder $destinationFilePath
  </code></pre>
  
  <p>now I want him to zip special folders which I already sorted out :</p>
  
  <pre><code>get-childitem "C:\zipme\" | where-Object {$_.name -eq "www" -or $_.name -eq "sql" -or $_.name -eq "services"}
  </code></pre>
  
  <p>This small function finds the 3 folders I need called <code>www, sql and services</code>. But I didn't manage to insert this into my zip function, so that exactly this folders are zipped and put into <code>C:\_archive\zipped</code></p>
  
  <p>Because a string is used instead of an array, he tried always to look for a folder called wwwsqlservice which is not there. I tried to put an array using <code>@(www,sql,services)</code> but i had no success, so whats the right way, if there is one?
  It should compatible with powershell 2.0, no ps3.0 cmdlets or functions please.</p>
  
  <p>thanks in advance!</p>