Solved

setting mapi virtual directory

Posted on 2016-10-07
10
118 Views
Last Modified: 2016-10-07
We are trying to set our mapi virtual directory, as follows :-

We have a single 2012 standard server running 2 hyperv servers. One is our domain controller "2012serv" and the other is our exchange server "exch2016"

Running the Get command confirms it is set to the local name :-

[PS] C:\Windows\system32>Get-MapiVirtualDirectory|fl identity,*url*


Identity    : EXCH2016\mapi (Default Web Site)
InternalUrl : https://exch2016.domain.local/mapi
ExternalUrl :

When trying to set our MapiVirtualDirectory to remote.domainname.co.uk as follows :-


[PS] C:\Windows\system32>Set-MapiVirtualDirectory -Identity "https://remote.domainname.co.uk/mapi"
The operation couldn't be performed because object 'exch2016.domain.local\https://remote.domainname.co.uk/mapi'
couldn't be found on '2012serv.domain.local'.
    + CategoryInfo          : NotSpecified: (:) [Set-MapiVirtualDirectory], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : [Server=EXCH2016,RequestId=caac24b3-c59a-4c25-99e0-d3f2849519d0,TimeStamp=07/10/2016 10:
   03:39] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] 4CF7E459,Microsoft.Exchange.Management.SystemCon
  figurationTasks.SetMapiVirtualDirectory
    + PSComputerName        : exch2016.domain.local


The default site is currently set to the local name, and we need it to be set to the external name so it matches our SSL certificate.

As you can see, when we try and set it to remote.domainname.co.uk we get an error.

Can anyone advise what we are doing wrong, and how we go about resolving this?

Many thanks
0
Comment
Question by:nigelbeatson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 16

Expert Comment

by:Ivan
ID: 41833435
Hi,

You have typed -Identity, and that should be something like: -Identity "exch2016\mapi (Default Web Site)"

To configure mapi, use command below.

Get-MapiVirtualDirectory -Server exch2016 | Set-MapiVirtualDirectory -InternalURL   "https://remote.domainname.co.uk/mapi" -ExternalURL   "https://remote.domainname.co.uk/mapi"

PS: Remove internalurl or externalurl if you don't want to configure it.

Regards,
Ivan.
0
 

Author Comment

by:nigelbeatson
ID: 41833448
many thanks.

I changed the get command as suggested, and it confirmed my thoughts that the mapi virtual directory is set to the local name, as follows :-

[PS] C:\Windows\system32>Get-MapiVirtualDirectory -Server exch2016

Name                          Server                        InternalUrl                   ExternalUrl
----                          ------                        -----------                   -----------
mapi (Default Web Site)       EXCH2016                      https://exch2016.domain.lo...

However, when I try the command suggested, I get the following :-

[PS] C:\Windows\system32>Set-MapiVirtualDirectory -InternalURL   "https://remote.domainname.co.uk/mapi" -ExternalURL
   "https://remote.domainname.co.uk/mapi"

cmdlet Set-MapiVirtualDirectory at command pipeline position 1
Supply values for the following parameters:
Identity: exch2016
The operation couldn't be performed because object 'exch2016.domain.local\exch2016' couldn't be found on
'2012serv.domain.local'.
    + CategoryInfo          : NotSpecified: (:) [Set-MapiVirtualDirectory], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : [Server=EXCH2016,RequestId=59a6f677-df02-47bb-a847-63fc50d06f18,TimeStamp=07/10/2016 10:
   41:06] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] 5AF6EB09,Microsoft.Exchange.Management.SystemCon
  figurationTasks.SetMapiVirtualDirectory
    + PSComputerName        : exch2016.domain.local


Any suggestions?

Many thanks
0
 
LVL 16

Expert Comment

by:Ivan
ID: 41833468
Hi,

can you type in entire command in one line. Don't split it on 2 commands, just copy/ paste :)

Get-MapiVirtualDirectory -Server exch2016 | Set-MapiVirtualDirectory -InternalURL   "https://remote.domainname.co.uk/mapi" -ExternalURL   "https://remote.domainname.co.uk/mapi"
0
Office 365 Advanced Training for Admins

Special Offer:  Buy 1 course, get 2nd free!  Buy the 'Managing Office 365 Identities & Requirements' course w/ Accelerated TestPrep, and automatically receive the 'Enabling Office 365 Services' course FREE!

 

Author Comment

by:nigelbeatson
ID: 41833484
I did do it that way, its just the way its been copied and pasted into the page.

I noticed some extra spaces between some of the commands, and having removed them, I now get this :-

[PS] C:\Windows\system32>Set-MapiVirtualDirectory -InternalURL "https://remote.domainname.co.uk/mapi" -ExternalURL "
https://remote.domainname.co.uk/mapi"

cmdlet Set-MapiVirtualDirectory at command pipeline position 1
Supply values for the following parameters:
Identity:


Its asking for an identity??

Any ideas?

Thanks
0
 
LVL 16

Accepted Solution

by:
Ivan earned 500 total points
ID: 41833491
Hi :)

I have attached picture. Take a look. Entire command should be entered. Copy and paste in notepad, if required, and then paste into Exchange Shell.

You need to have Get-MapiVirtualDirectory -Server exch2016 | in command, before you type Set-Mapixxxxxxx

Regards,
Ivan
mapi.jpg
0
 

Author Comment

by:nigelbeatson
ID: 41833503
lol - so sorry! I thought that was the first stage in checking and left it out on purpose! :0(

I had to laugh at my stupidity!

I will give it a try.

Many thanks
0
 
LVL 16

Expert Comment

by:Ivan
ID: 41833507
Heh, no problem :)
0
 

Author Comment

by:nigelbeatson
ID: 41833511
Many thanks, that worked perfectly! :)
0
 

Author Comment

by:nigelbeatson
ID: 41833513
Many thanks
0
 
LVL 16

Expert Comment

by:Ivan
ID: 41833516
Great. You are welcome :)
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision Office 365 tenants, synchronize your on-premise Active Directory, and implement Single Sign-On.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question