title: Delete multiple files or folders from a CSV file that contain more than one columns (Powershell)
body: <p>I need some help with script that will delete AD Disabled users Home Folders and Roaming Profiles folders on the Server (DC).
  Steps That I already done, I create a powershell command:</p>
  
  <pre><code>Import-Module ActiveDirectory
  Get-ADUser -SearchBase "OU=Marked for Deletion,OU=Disable Users,DC=******,DC=com" -Filter * -Property * |
  Select-Object -Property homeDirectory,profilePath | Export-CSV -Path .\Remove.csv
  </code></pre>
  
  <p>This Command export the properties of home folders and roaming profile folders of disabled users.
  Now' the CSV file contains two colmuns, one is "homeDirectory" and second "profilePath"</p>
  
  <p><img src="https://i.stack.imgur.com/URrx1.jpg" alt="example"></p>
  
  <p>The Problem is, when i execute this script, i get error.</p>
  
  <pre><code>$folders = Get-Content "C:\lab\remove.csv"
  
  foreach ($homeDirectory in $folders) {
      Remove-Item -Path $homeDirectory -force -Recurse
      }
  foreach ($profilePath in $folders) {
      Remove-Item -Path $profilePath -force -Recurse
      }
  write-host -foregroundcolor yellow "Delete action complete"
  </code></pre>
  
  <p>Can somebody help me with this, I will appreciate it.</p>