title: Copy userprofiles
body: <p>I am trying to copy selected folders from all user profiles, but obviously doing it wrong. Could you point me in the right direction?</p>
  
  <pre><code>$destination = "C:\Backup"
  
  $folder = "Desktop",
            "Downloads",
            "Favorites",
            "Documents",
            "Music",
            "Pictures",
            "Videos" ,
            "AppData\Local\Mozilla",
            "AppData\Local\Google",
            "AppData\Roaming\Mozilla"
  
  $computername = gc env:COMPUTERNAME
  $userprofiles = Get-ChildItem "C:\Users" -Directory
  
  foreach ($userprofile in $userprofiles) {
      Get-ChildItem "C:\Users" -Directory
  
      foreach ($f in $folder) {
          $BackupSource = $userprofiles  + "\" + $f
          $BackupDestination = $destination + "\" + $computername + "\" + $userprofiles + "\" + $f
          Copy-Item -ErrorAction silentlyContinue -Recurse -Path  $BackupSource -Destination $BackupDestination
      }
  }
  </code></pre>