Lägg till sekundär e-post

# Script to add sec mailaddress
# Use CSV primarySmtpAddress and email2
param ([string] $CSVPath)
$CSVUsers= (Import-CSV -delimiter ";" $CSVPath)
ForEach ( $CSVUser in $CSVUsers )
{$Temp = Get-Mailuser $CSVUser.PrimarySmtpAddress
$Temp.EmailAddresses += ("smtp:"+$CSVUser.email2)
Set-Mailuser $CSVUser.PrimarySmtpAddress -EmailAddresses $Temp.EmailAddresses}