Skip to main content

Posts

Showing posts from March, 2010

FreeBusy Board for the Exchange EWS Managed API using Powershell

This is a port of one of my previous EWS powershell scripts that produces a freebusy board using EWS. The advantage of this one is that it uses the EWS Managed API and it also exposes the private enums on the appointment details so it avoids publishing any appointments that are marked as private. For those familiar with using the EWS Managed API its also a lot easier to customize to your own needs. For details on how and why it work please see the previous post linked up the top. I’ve put a download the code here the code itself look like $dllpath = "C:\Program Files\Microsoft\Exchange\Web Services\1.0\Microsoft.Exchange.WebServices.dll" [void][Reflection.Assembly]::LoadFile($dllpath) $service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2007_SP1) $windowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent() $sidbind = "LDAP://<SID=" + $windowsIdentity.user.Value.

NDR hunt using the EWS Managed API and Powershell to find and delete NDR messages in a mailbox

While this is the time of year that we are more often concerned with hunting down round chocolate things to stuff in our gobs one endearing task most mail administrators must deal with is the management of NDR messages. NDR’s while exceedingly useful at the time a problem occurs once this time has passed their usefulness falls and they tend to become redundant fragments of information that can clutter a mailbox. Especially if you are copying these items to an administrator mailbox you can soon see the mailbox size and item count shot up exponentially if cleanups aren’t occurring on a frequent basis. Because deleting email can be a very tedious process this is something that can be easily scripted using the EWS Managed API and powershell with a few general provisos. First because in some case you maybe deleting a lot of items (eg I had to remove over 100000) using the batching features of EWS is highly desirable which will reduce the number of requests you need to make to the server and

Mailbox Size Gui - Exchange 2010 Remote Powershell version

One of the most popular scripts I've posted over the past few years has been the mailbox size gui for Exchange 2007 which evolved over a few different versions. While this is really only scratching the surface of the kind of cool things you can do with this information time and life hasn't really allowed me to make it better. But what i have managed to do is to port it to work with Exchange 2010 using remote powershell from a Windows 7 workstation. A few challenges that needed to be solved to do this was first a front-end winform that allowed you to select the Exchange server you want to remote the powershell session to. Then some simple code to establish the remote PS Session which look like this [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") $form1 = new-object System.Windows.Forms.form $form1.Text = "Exchange 2010 Remote PS Select" $form1.size = new-o
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.