Solved

setting mapi virtual directory

Posted on 2016-10-07
10
131 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 17

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 17

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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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 17

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 17

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 17

Expert Comment

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

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

696 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