Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to swap Primary & Secondary SMTP addresses

Status
Not open for further replies.

RCorrigan

MIS
Feb 24, 2004
2,872
MT
I have a user that needs her email to be swapped between Primary & Secondary depending on which Office she is working in.

Mon, Tue, Wed she needs primary to be user@domain.com and Thursday, Fri it's user@domain2.co.uk

She is not subject to the recipient policy (unchecked in AD) & the change can be made in AD by hightlighting and swapping etc

Is there a simple script that could change the SMTP to smtp and viceversa (i.e. not deleting anything just swapping)

Many Thanks In Advance

<Do I need A Signature or will an X do?>
 
I've been looking at Powershell and have managed to get a mailbox list out of a script (I'm new to this!!!) Does anyone know where I can get a list of properties that pertain to each mailbox object ? (That way I might be able to work my original question out myself!!!!)

MTIA

<Do I need A Signature or will an X do?>
 
get-mailbox -identity 'alias' | fl

This will give you all the attributes.
E-mails are EmailAddresses - which is new version of proxy addresses and WindowsEmailAddress - which is the primary SMTP.

As long as both addresses appear in the EmailAddresses you could probably muck about with

set-mailbox -identity 'alias' -WindowsEmailAddress "new SMTP"

Neill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top