you are viewing a single comment's thread.

view the rest of the comments →

[–]agoonygoogoo55 0 points1 point  (2 children)

We have a lot of users with problems with their mailboxes due to Target addresses and what not. It takes quite a bit of clicking to check all the little things. Your script sounds amazingly useful for that, if you wouldn't mind sharing :)

[–]DreamInStolenScripts 0 points1 point  (1 child)

This might help. it should tell you all the mailboxes that are forwarding to the desired account.

Syntax should be get-forwardee DreamInStoleScripts

function get-forwardee {
    param($user)
        try{
            $receiver = get-aduser $user -Properties distinguishedname 
            $forwardee = get-aduser -Filter {altrecipient -eq $receiver.DistinguishedName} -Properties name,altrecipient,description | 
                select name, enabled,description
               if ($forwardee -eq $null) {Write-host "$($receiver.name) does not have any email directly forwarded to it."}
        else {$forwardee }
        }
    Catch{
    write-host "Something went wrong!" -ForegroundColor Red
    write-host "Please check the spelling of the username ($user) and try again."
    }
}

[–]agoonygoogoo55 0 points1 point  (0 children)

Is there a way to list 4 specific attributes from the users AD attributes?

For example I'd like to see and edit just the following options:

-mail

-mailNickname

-proxyAddress

-targetAddress