Freigeben über


Exchange Server 2016- Part 3 common tasks on mailbox server

In part 2 of this blog Here we have installed and configured the exchange mailbox and have opened the exchange messaging center. Needless to say that this is important to do the tasks from the Messanging shell because there lies all the power of exchange! So here are the couple of extremely basic things that you'd like to do with your exchange.

Creating a new user.

When a new user joins a company; the first thing is that he is handed over an email address. Well- here is what we are going to do just now. In the examples below a chap called Mike Rogers will get his email screwed up by us. Lets start by creating an email for him. The following command on exchange management shell will create a mailbox for Mike Rogers.

New-Mailbox -Name "Mike Rogers" -UserPrincipalName Mike@mayanks.ga -Password (ConvertTo-SecureString -String 'Hcl@123' -AsPlainText -Force) -FirstName Mike -LastName Rogers

 

To confirm that that user account has indeed been created- we will use the following command.

Get-Mailbox -Identity "Mike Rogers" | Format-List Name,DisplayName,Alias,PrimarySmtpAddress,Database

This is what I see when I run this command, Take a look at the Database name. We are going to speak a lot about it in coming blogs however if it is not clear to you already- please note, the user mailbox will be hosted on the databases. There can be 10 databases hosting 1000 users or just one database hosting 1000 user mailboxes. We will keep this discussion in abeyance until we do our basic tasks first.

Enabling email support for an existing user.

So what happens when you already have an active directory user before you installed exchange on it. Its actually pretty simple to enable email access for him. the following command will enable the email access to the user. Lets create an email for the corrupt ex-president of United states Francis Underwood.

Enable-Mailbox -Identity frank@mayanks.ga -Database "Mailbox Database 1895211678"

 

 

See how easy it is. Now if Mr Underwood wants to manipulate things.. like he do; he would like to send an email as someone else as well, hiding his own identity. In the boring world of the IT- lets say a company A has recently been acquired by the company B. Company A originally has an emails configured like a@A.com and for company B it was b@B.com. Now all the users will be using @B.com domain. You now want to make sure that the users of company A keep getting the emails from their original email address. So you will add an alternate email address to the mailbox.

 

Set-Mailbox "Francis Underwood" -EmailAddresses @{add="Frank@president.us"}

Now any email that will be sent to frank@president.us will be forwarded to the mailbox of Francis underwood in addition to the any email sent on frank.mayanks.ga! Keep in mind- the Francis could not identify if the email was sent to him from @president.us. once he logs in the web login in outlook as frank@mayanks.ga.

 

Since I want to keep Frank in check, I can check the email address of Frank by running the following command:

Get-Mailbox "Francis Underwood" | fl EmailAddresses

 

Now if Francis wants to see all the emails sent to Poor Mike Rogers like Peter Russo- he can run the following command so that all the emails of Mike will be forwarded to Franks account.

 

Set-Mailbox -Identity "Mike Rogers" -DeliverToMailboxAndForward $false -ForwardingSMTPAddress "Frank@mayanks.ga"

Take a look at this: DeliverToMailboxAndForward is set to false- meaning all emails will be sent to frank without even Mike's knowledge. 

Since I am the director of the show- I will decide who will do what. So I can know whos email is being seen by whom and how to turn in back to how it was.

Get-Mailbox | Where {$_.ForwardingAddress -ne $null} | Set-Mailbox -ForwardingAddress $null -DeliverToMailboxAndForward $false

 

Lastly how to make sure that no one outside can make any contact with Poor chap Mike? its easy..

 

Set-Mailbox -Identity "Robin Wood" -RequireSenderAuthenticationEnabled $true

 

when RequireSenderAuthenticationEnabled is set to $true Mike can only receive the email  only in your organization.

 

I hope you'd found this blog useful, in Next blog- we will discuss some other interesting aspects of mailbox servers.

 

Cheers!

Mayank

Comments

  • Anonymous
    June 28, 2017
    pop mailbox and mailbox pop3.