Remote User Mailbox Modification RRS feed

  • Question

  • Goal: Remotely Modify Forwarding Address of Termed User

    I have started to write a script that gathers the following variables: 1) user's mailbox to modify and 2) the email address of the user to forward the mail to

    I then import the Microsoft Exchange session and run the following command: Get-Mailbox -Identity $sAMAccountName | Set-Mailbox -DeliverToMailboxAndForward:$False -ForwardingAddress $adUser_mail

    The $sAMAccountName is the termed user's ID and the $adUser_mail is the email of the person to forward the mail to. When I run this remotely, I get the following response: WARNING: The command completed successfully but no settings of 'domain.com/company/testUserAccount' have been modified. After checking the testUserAccount nothing is modified

    When I go onto the Exchange server and run the command directly into the Exchange Management Shell, it works fine...

    How can I get this ti run correctly from a remote machine?

    Monday, February 17, 2014 4:57 PM


All replies

  • Well, since you've asked you question in a forum for Exchange releases prior to Exchange 2010, I'd say that you need to install the Exchange Management Tools on the machine you're running the script on.

    --- Rich Matheisen MCSE&I, Exchange MVP

    Monday, February 17, 2014 10:40 PM
  • Sorry, for the wrong forum post.... I am running Windows 7 64bit. The version of Exchange is 2010 and the server is 2008R2.

    I will try your suggestion and repost results.

    Tuesday, February 18, 2014 1:39 PM
  • I was able to get the script to work using the Exchange Management Shell on my Windows 7 machine. 

    I guess that does qualify for my goal, but I hoping to get this to work using just the standard Powershell v2/v3 that is installed by default just by importing the Exchange module.... This way we don't have to install the extra programs on every helpdesk machine....

    If there is a way to get this to work using the standard Powershell, I would prefer this, but if not, I guess this will have to do...

    Tuesday, February 18, 2014 6:34 PM
  • There are prerequisites before installing the management tools.


    --- Rich Matheisen MCSE&I, Exchange MVP

    Tuesday, February 18, 2014 10:20 PM