Quantcast
Channel: Exchange Server Development forum
Viewing all 7132 articles
Browse latest View live

How to change set ExternalServerExclusiveConnect flag to OFF in Exchange 2010

$
0
0

The ExternalServerExclusiveConnect flag is set to On, and this is causing issues with Autodiscover.   An External URL is specified as an  EWS virtual directory, which is being served, when the internal one is required.  How can I set this value ofExternalServerExclusiveConnect to OFF?  Is it available through The Management Console?  Or through the Management Shell?

Apologies, I am a beginner with Exchange administration.

Many  thanks

Philip


Powershell script to exclude a folder from a retention policy or retention tag

$
0
0

Hi All!

I have an office 365 retention policy for my users that has 3 tags:

-delete email in all inbox's after 3 years

-delete junk folder after 14 days

-delete from deleted items after 60 days

We will have our users move emails from all folders that they want to keep that are older than 3 years into an "Archive" folder.

Currently, this "Archive" folder we have is a part of this retention policy. I need a powershell script that will create a retention tag that will exclude the "Archive" folder from this policy as this is where all important emails older than 3 years will be stored permanently.

Can anyone assist? All help is greatly appreciated!

Brandon


EWS/Powershell: Adding categories to a users master category list in Exchange 2010

$
0
0
Hello,

Is there a way to add a Category to the Master category list  or to show the Master cartegory list in Exchange 2010 usingEWS and Powershell?

I only found same blog entries on using Java to add a category on Exchange and I wonder if there is a similar approach I could use to do the same on Exchange 2010 with EWS.
 

Best Regards,

Marcel Adam

Code in Outlook custom form is not updated when published

$
0
0

Hi,

I'm changing a custom form for tasks in Outlook 2016. The original form was created with Outlook 2010 and was published to Exchange Server 2007. Now we have Office 2016 and Exchange 2010. Now we want to change some code of this form. When we change anything in the user interface and publish the form we see the new UI, but changes in code are not updated, we still have the old code. Nevertheless, when we open the code through the "developer" option of Outlook we DO see the new code! When we execute the form in developer mode, the code also executes well! But when we publish the form, code is not updated and still executes the old versión, although the UI is updated.

What can be wrong?

Thanks in advance,

Jesus

Exhange Web Service: Angle brackets in cid/ContentId results in broken Inline attachments

$
0
0

We are using a servicedesk application which is sending out e-mail using Exhange Web Service (EWS). But when sending e-mail with images (usually screenshots) the images is not showing. When right clicking an choosing view source in Outlook, we can se that the broken image har coding like this:

<img width=100 height=100 id="1" src="cid:&lt;helge.jpg&gt;">.

The image is broken also on webmail client like Gmail, Outlook.com.

The funny thing is that the image is displaying correctly when sending from the Servicedesk application to a user one the same Exchange server.

Our programmers have looked at the documentation for EWS:

msdn.microsoft.com/en-us/library/office/hh532564%28v=exchg.80%29.aspx?f=255&MSPPError=-2147217396

And the programmers of the ServiceDesk applcation have provived the code they use for EWS:

fileAttachment.ContentId=string.Concat("<", str,">");

So based on the example from Microsoft, they add < and > around the id, but the example from Microsoft does not.

Our programmers made a explample using :

email.Attachments[0].ContentId="WithoutAnglebrackets.jpg";
email.Attachments[1].ContentId="<WithAnglebrackets.jpg>";

This resulted that the first attachment is showing in the Email, but not the other.

The servicedesk programmers is refering to tools.ietf.org/html/rfc2392, that the anglebrackets is allow.

They also is telling us that the application is working on their Exchange 2010. (We are using Exchange 2013).

So is this a Exchange problem? Or the the programmer wrong with adding anglebrackets?

Converting a Mailbox to a Mail-Enabled User (Exchange 2010 to Exchange Online)

$
0
0

Hi All .... I was asked to post here in dev to see if anyone can assist. (From https://social.technet.microsoft.com/Forums/exchange/en-US/f17a2fae-dab0-4148-a58c-eb193b35b7e9/convert-to-a-mailenabled-user-after-cutover-migration?forum=exchange2010)

We are migrating from Exchange 2010 to EO and before enabling DirSync we would normally (on previous versions of Exchange, 2003, 2007) convert each mailbox to a mail-enabled user per https://community.office365.com/en-us/w/exchange/845.convert-exchange-2007-mailboxes-to-mail-enabled-users-after-a-staged-exchange-migration.

There does not seem to be ANY info around I can see that clearly states how to convert or better still, a script similar to above link that can be run per User or group of Users.

Can anyone help?

[E2010][PS][PS][Windows]: How to use Get-/Set-MailboxFolderPermission when folder name contains backslash (\)

$
0
0

Hi,

Using the Exchange management shell, in order to read / set permissions on one or more folders in a mailbox, I have used Get-MailboxFolderStatistics to get the list of folders and read the FolderPath property.
For example, if I create a folder directly under my inbox called 'a', the folderpath is listed as /Inbox/a

This format doesn't appear to be supported by Get/Set-MailboxFolderPermission, so in order to use this path, I take FolderPath from Get-MailboxFolderStatistics, replace forward slashes with backslashes and prepend with
emailaddress and a colon.
For example Get-MailboxFolderPermission -Identity user@domain.com:\Inbox\a

If a user had named the folder "a\b" instead of "a", how do you query its permissions using Get-MailboxFolderPermission? e.g. if I enter: Get-MailboxFolderPermission -Identityuser@domain.com:\Inbox\a\b this will look for a folder 'b' under folder 'a' instead of a folder "a\b" directly under the inbox.
The folderpath returned from Get-MailboxFolderStatistics returns: /Inbox/a\b.
I'm guessing it can be escaped somehow to be used with Get-MailboxFolderPermission?

Things I've tried:
Creating a folder "a", directly under the inbox and a subfolder "b" underneath that.
At the same time create a folder called "a\b" directly under the inbox
Then I examined the Identity property from Get-MailboxFolderStatistics (because the Identity property is in a very similar format to the path accepted by Get-MailboxFolderPermission) to see how it handles or possibly escapes it:

Folderpath: /Inbox/a/b
Identity: user@domain.com\Inbox\a\b

Folderpath: /Inbox/a\b
Identity: user@domain.com\Inbox\a\b

Identities appear to be identitcal.

I've also attempted to create an object of type Microsoft.Exchange.Configuration.Tasks.MailboxFolderIdParameter using the
FolderId property from Get-MailboxStatistics:
e.g.
$mboxFolderConfig=$res=Get-MailboxFolderStatistics -Identity user@domain.com |? {$_.Name -eq 'a\b'}
$folderID=$mboxFolderConfig.folderID
$folderIDParam=New-Object -TypeName 'Microsoft.Exchange.Configuration.Tasks.MailboxFolderIdParameter' -ArgumentList $folderID

Get-MailboxFolderPermission -Identity $folderIDParam

But this results in:
Cannot process argument transformation on parameter 'Identity'. Cannot convert the "LgAAAACm83xqhmJ6QoUCu2eGyK1yAQC+3DA
vyyRTTrUlzhTXj3yAAAA1KdWxAAAB" value of type "Deserialized.Microsoft.Exchange.Configuration.Tasks.MailboxFolderIdParame
ter" to type "Microsoft.Exchange.Configuration.Tasks.MailboxFolderIdParameter".
    + CategoryInfo          : InvalidData: (:) [Get-MailboxFolderPermission], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-MailboxFolderPermission

Not sure what else to try.....

Thanks

Steve

 

Exchange Web Service 2007 SP1 "The property Body can't be used in FindItem requests".

$
0
0

I'm trying to get the body of the email back and I can't understand why I keep getting this error.  I've defined it in the PropertySet.

Here's a snippet of the code I'm using.

List<SearchFilter> searchFilterCollection = new List<SearchFilter>();
            searchFilterCollection.Add(new SearchFilter.ContainsSubstring(ItemSchema.Body, "Delivery has failed to these recipients or distribution lists"));

            // Find all items where the body contains "Delivery has failed to these recipients or distribution lists"
            SearchFilter searchFilter = new SearchFilter.SearchFilterCollection(LogicalOperator.Or, searchFilterCollection.ToArray());

            // Create a vwe with a page size of 50
            ItemView view = new ItemView(500);

            // IDentify the Subject and DateTimeRecieved properties to return.
            // Indicate that the base property will be the item identifier
            view.PropertySet = new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.Subject, ItemSchema.DateTimeReceived, ItemSchema.Body);

            // Order the search results by the DateTimeRecieved in decending order
            view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Descending);

            // Set the traveral to shallow. (SHallow is the default option; other options are Associated and SoftDeleted.)
            view.Traversal = ItemTraversal.Shallow;

            // Send the request to search teh Inbox and get the results.
            FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, searchFilter, view);


Get all appointments from a resource(room) in Exchange Online(2010) with EWS

$
0
0

Hello technet,

Speccs: Visual Studio 2010, Exchange Online (2010), Using Exchange Web Service API and C#.

I need to display the next 2 meetings(appointments) from all my room-resources.

I can get all my own appointments when I bind the service to my personal exchangeprofile using EWS, but this is not possible for the rooms because they are resources.

Just to be clear, - I am looking for something that can return a list of all meetings(appointments) in a desired room(resource).

I really hope someone can help me!

Thanks in advance, Mads.


EWS renamed calendar folder does not change in Office 365 shortcut bar

$
0
0

I have code that successfully is able to rename Office 365 folders through EWS API by changing the "DisplayName property and updating the folder (using folder.update).  Once the folder is renamed it is available though the  EWS API as the new name.  Unfortunately, when the folder appears in the Office 365 interface it still has the old name.  This calendar folder is under the main "Calendars" folder and not under "Other "Calendars"

If the folder name is changed manually through the Office 365 interface, the DisplayName property for the folder in the EWS API is changed to the new name.  It is almost like the Office 365 interface is reading the folder name from another location, but writing the DisplayName to multiple locations.  

Also, if I Create a folder name in the EWS API, it shows up properly in O365.

Anyone have any ideas ???

Thanks

Bill

Exchange 2010 Powershell - Export All Contacts from Selected Users Mailboxes to CSV File

$
0
0

I search for several days to find a script for exporting contacts from selected mailboxes using powershell.  I found code snipets here and there and after much work got the export to complete sucessfully.  Here is the code.  I'm hoping it saves someone else the time and frustration I put in. 

Thanks to all who provided snipits that are pasted together here.

$dllpath = "C:\Program Files\Microsoft\Exchange\Web Services\1.2\Microsoft.Exchange.WebServices.dll"

[void][Reflection.Assembly]::LoadFile($dllpath)

$service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP1)

$windowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent()

$sidbind = "LDAP://<SID=" + $windowsIdentity.user.Value.ToString() + ">"

$aceuser = [ADSI]$sidbind

$service.AutodiscoverUrl($aceuser.mail.ToString())

$outputfile = "c:\ContactExport.csv"

#Header rows
'"User","First Name","Last Name","Company","Address1","City","State","Zip","Home Phone 1","Work Phone 1","Cell Phone 1","Fax/Other 1","Email 1","Home Phone 2","Work Phone 2","Email 2"' | Out-File -Encoding ASCII -FilePath $outputfile -append

#traverse mailbox and pull out All Contacts
function getcontacts ([string]$MailboxName)
{
 $ContactsFolderid  = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Contacts,$MailboxName)
 $view = New-Object Microsoft.Exchange.WebServices.Data.ItemView(10000,0)
 $findResults = $Service.FindItems($ContactsFolderid,$view)

foreach($item in $findResults)
 {
 """$MailboxName"",""$($item.GivenName)"",""$($item.Surname)"",""$($item.CompanyName)"",""$($item.PhysicalAddresses[0].Street)"",""$($item.PhysicalAddresses[0].City)"",""$($item.PhysicalAddresses[0].State)"",""$($item.PhysicalAddresses[0].PostalCode)"",""$($item.PhoneNumbers[8])"",""$($item.PhoneNumbers[2])"",""$($item.PhoneNumbers[11])"",""$($item.PhoneNumbers[1])"",""$($item.EmailAddresses[0].Address)"",""$($item.PhoneNumbers[9])"",""$($item.PhoneNumbers[3])"",""$($item.EmailAddresses[1].Address)""" | Out-File -Encoding ASCII -FilePath $outputfile -Append }
 }

#Pulls names from a csv file that you provide

foreach
($MailboxName in Get-Content "c:\UN.txt")
 {
 getcontacts -MailboxName ($MailboxName)
 }

how to calculate total size and Items count in Exchange 2010

$
0
0

hi,

can any one help me in below

 how to calculate total size and Items count in Exchange 2010

thanks

Exchange Server 2013 migration

$
0
0

Hi,

I have got one Exchange 2013 production Server with Mailbox and Client Access Roles installed.

My goal is to migrate this server to another one in a different network (different IP) with the same version of Exchange without have any downtime.

I need to consider DNS, Active Directory migration as well.

What is the best method to perform this task?

Any suggestions that might help would be appreciated.

Regards,

Tarek



Exchange / Outlook and Domino mails synchronization

$
0
0

I would like to synchronize two mail systems. My users have :
1. A first  mailbox "@domain.com" on Exchange Cloud.
2. A second mailbox "@domain2.com" on Domino On Premise, accessible only read only.

They use only Exchange mailbox to send and receive mails.
What i would like to do :

  1. When they receive a mail on Exchange, the mail is automatically
    transferred on Domino mailbox. That point is easy with a redirect rule,
    works with Outlook and OWA.

  2. When they send a mail, the mail is automattically tansferred on
    Domino mailbox as send element or the mail subject is tagged (like [SEND
    ELEMENT] Subject) and transferred in their inbox.

The second case doesn't work with OWA, wich does not allow sending rules.

Is someone have an idea about this issue or is there a tool to do this ?

Thanks!

AzureAD Connect in HybridExchange

$
0
0

So I'm working with a customer on a project and I can see a few conflicting statements regarding some point regarding deployment and really need some assistance in drilling down on thees.

So a customer has a hybrid exchange setup, with existing mailboxes both on-prem and in O365 already. We are wanting to set up AzureAAD connect to support provisioning to AzureAD to then be able to 'push' mailboxes up to o365.

However, existing o365 accounts have email addresses (which Is also their primart o365 login) which don't match their AD UPN's. When running the AAD connect wizard it asks to use the UPN to identify users in AzureAD. Now what I am wanting is to keep it the same and use their email address as their login for o365, however, there are lots of notes suggesting not to use the mail attribute for UPN in azureAD in hybrid setups. Please could someone advise me on this and whether it cannot be done with the mail field, or whether the UPN needs to be used (which is going to cause issues for existing users).

Apart from this, I'm assuming the process is juts the standard AzureAD connect settings, except ticking the exchange hybrid box in the optional field at the end?

Help would be much appreciated!



AD FS endpoints unavailable

$
0
0

AD FS endpoints unavailable. I configured AD FS. But when I try to connect to some endpoints, I can see "HTTP Error 503. The service is unavailable." The endpoints are enabled in the AD FS management.

I try to connect to ......adfs/services/trust/13/usernamemixed and ...../services/trust/13/windowsmixed

Exchange / Outlook and Domino mails synchronization

$
0
0

I would like to synchronize two mail systems. My users have :
1. A first  mailbox "@domain.com" on Exchange Cloud.
2. A second mailbox "@domain2.com" on Domino On Premise, accessible only read only.

They use only Exchange mailbox to send and receive mails.
What i would like to do :

  1. When they receive a mail on Exchange, the mail is automatically
    transferred on Domino mailbox. That point is easy with a redirect rule,
    works with Outlook and OWA.

  2. When they send a mail, the mail is automattically tansferred on
    Domino mailbox as send element or the mail subject is tagged (like [SEND
    ELEMENT] Subject) and transferred in their inbox.

The second case doesn't work with OWA, wich does not allow sending rules.

Is someone have an idea about this issue or is there a tool to do this ?

Thanks!

EWS .NET API: Invalid named property error when setting an extended property to EmailMessage object

$
0
0

Hi,

I am using EWS .NET API.

When I try to set extended property using either default property set or my custom GUID as property set Id in the .NET code, I receive error 'An internal server error occurred. The operation failed., Invalid named property: [{1ea5aebe-567f-44c7-8b26-936bf90ea5fd}:'PropertyName'] GuidName_PropertyName'.

The mail box is on Office 365.

This error is occurring to a specific mail box. The code works well for other mail boxes.

With regards,

Pinakin

Exchange web service Resolve name Error 401

$
0
0

Hello everybody!

I have a problem with a connection with an exchange server. I'm trying to use the ResolveName method to get the e-mail of a user from active directory. After creating the ExchangeServiceBinding object and set the url from the server, I call the method and it's returns a 401 Error, not authorized.

If I copy the url to a Internet explorer page and set the same credentials as I use on the code, I can access to the web service.

This is my code

           esb.RequestServerVersionValue = new RequestServerVersion();
           esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2010;
           esb.Credentials = new NetworkCredential("user", "pass");
           
            esb.Url = "https://myserver/ews/Exchange.asmx";

            ResolveNamesType rnType = new ResolveNamesType();
            rnType.ReturnFullContactData = true;
            rnType.UnresolvedEntry = "nameToResolve";

           // Resolve names.
            ResolveNamesResponseType resolveNamesResponse = esb.ResolveNames(rnType);

I'm stuck with this problem too much time, I appreciate your help.

Thanks in advance!!

Running O365 cmdlets with TLS1.2 only, must enable FIPS? Otherwise it doesn't work ?

$
0
0

I want to create an exchange online PowerShell session, so that I can run exchange online cmdlets in that. Cmdlets is :

New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $cred -Authentication Basic –AllowRedirection

Everything works fine unless I run it on TLS 1.2 only environment, but if I enable FIPS in local security policy console, it works fine too. Does anyone know how to make this work without enable FIPS? Is there an official document from MS to tell what is the correct configure in TLS 1.2 only scenario?

My configure steps are below:

1. My system is windows server 2008 r2 enterprise, and .net framework version is 4.6.


2. Only enable TLS 1.2 protocol, disable others via editing system registry. then restart the machine.


3. If I enable FIPS on the machine, it works finebut it uses TLS1.0 to communicate.


4. Disable FIPS on the machine,  run create pssession cmdlet will exception :


Error is :

New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message : The server

certificate on the destination computer (outlook.office365.com:443) has the following errors:      

Encountered an internal error in the SSL library. For more information, see the about_Remote_Troubleshooting Help topic.

At line:1 char:1

+ New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlo ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo         : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException

+ FullyQualifiedErrorId : 12175,PSSessionOpenFailed

5. I also try to visit same domain site with TLS 1.2 only in IE advance setting, the machine can visit https://outlook.office365.com

 

 


Viewing all 7132 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>