Solved

setting mapi virtual directory

Posted on 2016-10-07
10
33 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
  • 5
  • 5
10 Comments
 
LVL 15

Expert Comment

by:Ivan
Comment Utility
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
Comment Utility
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 15

Expert Comment

by:Ivan
Comment Utility
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
 

Author Comment

by:nigelbeatson
Comment Utility
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 15

Accepted Solution

by:
Ivan earned 500 total points
Comment Utility
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
Want to promote your upcoming event?

Are you going to an event? Are you going to be exhibiting at a tradeshow? Talking at a conference? Using a promotional banner in your email signature ensures that your organization’s most important contacts stay in the know and can potentially spread the word about the event.

 

Author Comment

by:nigelbeatson
Comment Utility
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 15

Expert Comment

by:Ivan
Comment Utility
Heh, no problem :)
0
 

Author Comment

by:nigelbeatson
Comment Utility
Many thanks, that worked perfectly! :)
0
 

Author Comment

by:nigelbeatson
Comment Utility
Many thanks
0
 
LVL 15

Expert Comment

by:Ivan
Comment Utility
Great. You are welcome :)
0

Featured Post

Why do Marketing keep bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

Join & Write a Comment

Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
In this video we show how to create a Contact 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 Recipients >> Contact ta…
To show how to create a transport rule 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 Mail Flow >> Rules tab.:  To cr…

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now