# Set Forwarder for multiple Users
# By Alberto Igbinedion
# Requires A CSV with Row Haeding ImportName

$u = import-csv "C:\Users\igbina_admin\Documents\Scripts\Input\ForwarderTest.csv" 


ForEach ($user In $u) 


{


$ForwardingAddress = $user.Importname + "@notes.ons.gov.uk"

Set-Mailbox -identity $user.Importname -ForwardingSmtpAddress $ForwardingAddress -DeliverToMailboxAndForward $false

get-mailbox -identity $user.Importname | select *Forwar*, Name

}


# Set-Mailbox -identity jeremy.heaven -ForwardingSmtpAddress jeremy.heaven@notes.ons.gov.uk -DeliverToMailboxAndForward $false

# Set-Mailbox onstestuser.testuser -ForwardingSmtpAddress $null
# get-mailbox *onstest* | select *Forwar*

# Set-Mailbox -Identity jeremy.heaven -DeliverToMailboxAndForward $true -ForwardingSMTPAddress jeremy.heaven@notes.ons.gov.uk 
# Set-Mailbox <Identity> -EmailAddresses @{remove="@notes.ons.gov.uk"}


# Good To Go


