Solved

setting mapi virtual directory

Posted on 2016-10-07
10
73 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 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
This article explains how to install and use the NTBackup utility that comes with Windows Server.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

813 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

17 Experts available now in Live!

Get 1:1 Help Now