I'm trying to get the first column in mailboxreports.csv (DisplayName) and look into AD and export into a new csv more information so I can import elsewhere, but the exported file must be csv format like excel.
Import-Module ActiveDirectory
$Users = Import-CSV -Delimiter "," -Path "C:\Reports\MailboxReport.csv"
foreach ($User in $Users)
{
$displayName = $User.DisplayName
get-AdUser -Filter {Name -eq $displayName} -Properties Name,Title,City,L,OfficePhone,MobilePhone | Out-File c:\Reports\ADInfo.csv -Append
}
when I try export-csv..it also does something funky. (plus append switch is not supported by export-csv)
Any ideas anyone?