Exchange-Scripts/list-alias-csv-content.ps1

14 lines
475 B
PowerShell

# Author: Jeremy Berkleef
# This script will list the output of the generated alias .csv in console
#Ask where the .csv is
$CsvLocation = Read-Host -Prompt 'CSV path'
#Print a new line
Write-Host `n
#Read the .csv and print it to console
Import-Csv $CsvLocation | ForEach-Object {
Write-Host -Foregroundcolor Red -Backgroundcolor White (Write-Output $_.Displayname);
write-Host -foregroundcolor Green -Separator `n (Write-Output $_.EmailAddresses.Split(";"))
}