exchange-server,exchange-server-2010 , Exchange 2010 - All maiboxes with auditing enabled

Exchange 2010 - All maiboxes with auditing enabled


Tag: exchange-server,exchange-server-2010

I am trying to return a list of all mailboxes that have auditing enabled. I have tried the below, but it is returning all the users and not just those that have auditing enabled on their mailboxes. Can someone please help. Thanks

Get-Mailbox | select Name | where-object {$_.AuditEnabled -eq $true}


You might want check your pipeline and move the where-object before the select eg

get-mailbox | Where-Object {$_.AuditEnabled -eq $true} | select Name

Cheers Glen


How to create notes using EWS Managed API 2.0

Even looking into MSDN's Exchange 2013 - 101 Code Samples, I could not find an example creating notes using EWS Managed API 2.0. On Folders and items in EWS in Exchange, the most appropriate item type seems to me PostItem but my test failed trying to create such items in...

EWS subscriptions “falling off”

I'm working on a synchronization system, which synchronizes Outlook with another system. I am subscribing to around 600 mailbox calendars in an Exchange 2013 server. When the subscription is done, I pull the users entire mailboxes, to perform a full synchronization with the other system. This works well. Now the...

Get actual delegates

I have the following script and I am trying to get a list of the actual delegates and remove the servers, etc Get-MailboxPermission -Identity technology.servicespmo | where {($_.user.tostring() -ne "NT AUTHORITY\SELF")-or ($_.user.tostring() -ne "server\AdmEnterprise Servers Advance")-or ($_.user.tostring() -ne "server\Domain Admins")-or ($_.user.tostring() -ne "server\Exchange Domain Servers") -or ($_.user.tostring() -ne "server\Exchange Services")...

How to import meetings into office365 (EWS and Powershell?)

I need assistance importing bookings/meetings into office365. I can export the booking information from our old web-based system into csv, but need a way to import into exchange in office365. The most promising method I have found is using Exchange Web Services to connect to the cloud with powershell an...

Errors after the system state restoration of Exchange server

Time ago I made a system state restore of my Exchange server. And now my exchange behaves in a strange way. I unable to run some eseutil command without problem. When I try to run eseutil /r e00 it give me an usage error: Invalid argument. At the same time...

Exchange 2010 - Powershell to remove Send On Behalf permission

I'm trying to run the command below to remove e Send On Behalf permission, but i'm getting an exception and it removes all the users that have access, instead of the one I specify in my script $owner = "lpeter" $remove = "jdoe" $grantlist = Get-Mailbox $owner -DomainController tordc01 |...

Get SMTP address from a list of Names (Exchange 2013 powershell)

I'm trying to get SMTP address's for users who have OWAEnabled. I have what I think are two pieces that do what I want, but I can't figure out how to put them together. Ultimately it will output the SMTP address's to a CSV. Get-CASMailbox -Filter{OWAEnabled -eq $true} | Select-Object...

Asterisks instead of SMTP codes in response from Microsoft Exchange server

I'm working on a Laravel 4.2 application that needs to be able to send emails. When the SwiftMailer component contacts the Microsoft Exchange server we use here it's receiving the following reply: * OK The Microsoft Exchange IMAP4 service is ready. * BYE Connection is closed. 13 My understanding is...

GetUserAvailabilityResults shows result outside working hours in Exchange web service

GetUserAvailabilityResults shows result which are outside working hours in Exchange web service although I have set MaximumNonWorkHoursSuggestionsPerDay = 0 Also, I want to know how to get and set the working hours. Moreover, results.AttendeesAvailability returns null private static void GetSuggestedMeetingTimes(ExchangeService service) { // Create a list of attendees. List<AttendeeInfo> attendees...

How get user contacts list from EWS

I'm developing web application which is similar to address-book, now I want to create a page with list of user contacts. I already have user email and show out_of_office badge using GetUserOOFSettrings API method. Does the API for getting user's (favorite) contacts list exists? E.g. to get MS Lync contacts...

Create mail in Exchange Online inbox programatically

Have been facing an issue since days about EWS. So my scenario is; I was to programmatically sync GMAIL and EXCHANGE ONLINE. So here is what I have done; Connect to Gmail using Gmail API Fetch mail from gmail get the email body, to, from, attachment and all other thing...

How to get email type using EWS?

i'm trying to find the diference between a normal mail and a notification mail (read:, delivery notification failure:, etc) it this possible? My development environment is c# Exchange-server 2010 Thank you. ExchangeService ews = new ExchangeService(ExchangeVersion.Exchange2010); ...

Store data in Outlook Addin for each user, then query it for all users

Is there a way for an Outlook add-in to store some data for each outlook user, then an Exchange admin can query this data for all users at once? If I store the data into Item.UserPorperties or Folder.StorageItems, Exchange Admins will not have access to them. And I prefer not...

EWS Managed API: Setup user email alias

I am looking into possibility to create or delete email aliases for user emails in Office 365 through EWS Managed API. It can be easily done through UI:, but unfortunately, I haven't found any methods in Exchange Web Services API to do this. Does anyone know if it's possible?...

Need to check the inbox of an Exchange server with C++

I'm working on a project in C++ to backup and restore email on Microsoft Exchange servers, I'm trying to write automated tests for the restore function. Right now I can create test users, databases, and mailboxes, and can send email between users through the Exchange Admin Powershell. However, Exchange doesn't...

Exchange with Powershell - Weird Error

I input my code and it is throwing an error. The code ran fine and I was able to get it to run through before I tried adding in the dropbox feature. I cant seem to figure out what is wrong with this... Method invocation failed because [System.Reflection.RuntimeAssembly] does not...

Exchange Server 2013 EMail Driver

I have a C# program that connects to my Exchange Server 2010 and is able to read every email. I am using the library. The problem is, that this program gives back the following exception on Exchange Server 2013: "The remote server returned an error: (501) Not Implemented." I...

Microsoft.Exchange.WebServices.Data.ServiceResponseException : The specified folder could not be found in the store

In office365, I am trying to access conversation history folder of another user using EWS api.The user that is trying to access has full access rights of the mailbox . If i connect to the mailbox using owa, i can access the conversation history folder including all other folders. But...

Using variables to pass arguments to a cmdlet in powershell

I'm trying to write a little script in powershell, specifically using exchange. All it does is asks for the sender and/or recipient, and then feeds back the the tracking logs based on a date, either specified or the last 30 days. I'm trying to use a switch to check which...

Add a trusted domain to everyone in exchange

Currently we have an HR email going out to the all of our staff. By default, the email gets sorted into the junk email for everyone. I'd like to use the PowerShell cmdlet Set-MailboxJunkEmailConfiguration to add the sending domain as a trusted domain to everyone without having to set it...

Exchange Remote Powershell gets sporadic 'Broken' state

I am trying receive the status of all TransportAgents from an remote Exchange Server through Windows Powershell. I sporadically receive an error, that the The session state is Broken. Once it is broken I need to create a new Session Below a list of the commands I am using (in...

How to search for an Exchange appointment for an iCalUid using Java EWS API?

I am using the Java EWS library to search for appointments in a user's calendar by iCalUid (example iCalUid I have: 040000008200E00074C5B7101A82E00800000000F66E2C0D59A9D001000000000000000010000000F7A6AACB779B00429164F39AE6DD6BB9). Here is my Scala code: import import import java.util.Date val exchange = { val service = new ExchangeService(ExchangeVersion.Exchange2010_SP2) service.setUrl(new URI(host)) service.setCredentials(new WebCredentials(user, pass)) service } def...

Modifying EKParticipants (attendees) in EventKit like Sunrise

My goal is to add some invitees to an EKEvent. I've looked into other questions like this, such as this one, but all say that it is essentially impossible to add EKParticipants to an EKEvent programmatically. I do see that the attendees property is read-only, but I see other services...

Is there any way to get the list of available equipment in exchange server?

I am trying to get all the resources available in exchange service. To get the list of rooms I am using the below code and it is working fine EmailAddressCollection myRoomLists = service.GetRoomLists(); Now the same way, I want to get the list of equipments ? Please help...

Can you assign a task to a contact using exchange 2010 EWS Managed API 2.0?

I'm struggling to find a way to assign a Task that I'm creating using the EWS Managed API 2.0 to an existing contact. Is there a way to do this using the API? For appointments, you can add an Atendee to the RequiredAtendees collection. Is there something similar to this...

Can't get Contact ID from EMAILBOX Object

I'm trying to get Contact ID from Email box using ResolveName method but it doesn't returns me the Contact ID Related with that contact.   MS reference

Create Exchange Message Items with EWS and mark them for deletion

I am using EWS to create items in an Exchange mailbox. I am using the CreateItems method. I am also setting an extended property on the items I create so that it is deleted when that date is reached. The items are created correctly, but they are not deleted at...

Trying to use cURL to access local Exchange server

I'm working on a project that involves a Microsoft Exchange 2013 mail server on my Windows Server 2012 machine. For the project, I need to send, read, and delete emails using cURL, preferably from the command line. The problem is, I'm having trouble connecting to the Exchange server with the...

How can I export each line of a csv file with poweshell

I am currently moving away from a script we have that queries the Message Queues wmi object within Exchange Server (2007-2013) to run solely within Powershell. Below is my code, albeit not the best (I am still new to this) which I have tested on 2007 and 2013 versions of...

Can't search delegated Inbox

I have Exchange 2010 server and Outlook 2010 local clients. Some users have delegated the access to their Inboxes to their assistants. It all worked well until recently, without any warning or other issues manifesting my users can't search inside delegated folders. They can access the Inbox and do everything...

Removing the device partnership in Exchange 2010 using Powershell

I'm trying to create a script that will remove the mobile phone partnership from a user in Exchange 2010. My plan of implementation was to use Get-ActiveSyncDeviceStatistics to find the identity of the mobile device then use Remove-ActiveSyncDevice to remove it. However, I cant seem to get the identity into...

Exchange 2013 ServerSide Event-Handler for Message-Flagging / Followup possible?

Is it possible to hook up some managed code into Exchange 2013 which is triggered when an E-Mail is flagged via Outlook or OWA? I've been fiddling around with transport-agents, but they seem to get invoked only on Mail-Transport events, which is not enough, because the E-Mail won't get through...

Powershell Exchange Module remote mailbox issue

I have created a scripts that automatically creates a user in Exchange and than adds a license to it from o365 however i need the box at the bottom where it says "automatically update email addresses based on the email address policy applied to this recipient" to automatically be checked...

Exchange Shell - SubjectOrBodyContainsWords

I'm attempting to create a rule per script but I'm unable to proceed because I seem to have reached a too high value... [PS] C:\Users\XXX\Desktop>New-InboxRule -Mailbox "Daniel.XXX" -Name "Test" -SubjectOrBodyContainsWords...

converting string to number in powershell

I am trying to convert a string to a 2 decimal place value I have a script that has a line of code which is (get-mailboxdatabase xxx -status).databasesize This returns the size something like 1.008 GB (1,082,195,968 bytes) I want to be able to convert this to a number (1.008)...

Trigger when a certain appointment is changed

Is there a way to trigger execution of code when a certain appointment is changed in Exchange? I push into Exchange via EWS some appointments created from information stored in our application, and when any of these appointments is deleted or rescheduled, I want to execute my own actions (like,...

Download attachment using active sync protocol

I am able to fetch the mail body & attachment details from server using Sync command. Now I am unable to find a way to download the attachment and show in the screen. Below is my sync command response. <?xml version="1.0" encoding="utf-8"?> <Sync xmlns:email="Email:" xmlns:airsyncbase="AirSyncBase:" xmlns:email2="Email2:" xmlns="AirSync:"> <Collections> <Collection> <SyncKey>334239291</SyncKey>...

Exchange 2010 - All maiboxes with auditing enabled

I am trying to return a list of all mailboxes that have auditing enabled. I have tried the below, but it is returning all the users and not just those that have auditing enabled on their mailboxes. Can someone please help. Thanks Get-Mailbox | select Name | where-object {$_.AuditEnabled -eq...

How to decide Bounce Back EmailMessage on Office365?

I'm using Exchange web service to read email from Office365. The C# program works fine. I can get EmailMessage in Inbox, and get their subject and message body, etc. However, I could not figure out the way to check whether the message is a bounce back message or not. Do...

How can i make my email as verified like PayPal

How can i make my email as verified like PayPal, even though my URL and exchange server is having SSL certificate its still going to spam folder.

How to get all mailbox details using “Get-MailBox” cmdlet?

I am not able to get all mailboxes using this cmdlet "Get-Mailbox", instead it is returning only one mailbox details for the account which is used for authentication. I have enabled windows authentication on Powershell in IIS for accessing exchange powershell using C# console application and authenticating it with administrator...

Trouble Receiving Emails from Microsoft Exchange

When people try and send me emails from Microsoft Exchange, they get this error. I don't really deal with email servers and I have no idea where to start though. Is this problem our side or their side? Or how would I go about fixing this issue? Delivery has failed...

Is Exchange Server 2013 extendable

For a project I'm working on, I need to subscribe to Exchanges server side events. Each time a calendar appointment is created, whether from Outlook or the web ui, I need to access the appointment data (date & time, participants, location, etc) so I can send it to an internal...

Move emails to SQL Server

I'm looking to write an application, in .net that will scan a mailbox and put new items into a SQL Server database. Just wondering what the best way to achieve this would be, in terms of an API. Is there an exchange specific one or a 3rd party one I...

Reuse EWS connection and negotiate authentication for Exchange

I am writing a program to dump the contents of numerous mailboxes from an Exchange server using EWS in C#. Using fiddler I noticed that each request I send makes a new connection (tunnel), with a new authentication process being undertaken (using negotiate). My ServerCertificateValidationCallback gets called for every request....

EWS can not receive push notification from office365

I am using EWS api to develop an androd application on tablets to connect with office365. The app poll to office365 server to request the calendar information. However, sometime it is limited by the throttling policy when the app is installed on 15 devices and each device poll with 5-second...

Dynamic distribution groups: Which DDGs is user part of?

I know how to get all the members of a dynamic distribution group: I can take the distribution group, get the AD filters from msExchDynamicDLFilter and msExchQueryFilter properties and query the AD for the users who match that filter. Now, how do I go the other way? E.g. show which...