Skip to main content

Posts

Showing posts from February, 2010

Create a folder under the Inbox if one doesn't existing using Powershell and the EWS Managed API

I've covered this one before using other Exchange API's and versions but here's a potentially useful script if you want to create a folder in a Mailbox with a powershell/EWS script. To avoid any errors it does a search of the target folder where your going to create the subfolder first. Although this isn't 100% needed as the error you will get if it does exist is pretty self explanatory its good practice to do this anyway The script like many others I've posted uses the currently logged on user to then access another mailbox using Delegate access. I've included two versions one is feed via the Get-Mailbox cmdlet so this could potentially be used to add a folder for every mailbox on a particular server (as long as you have rights). I've put a download of the script here the script which if feed via get-mailbox looks like function CreateFolder($MailboxName) { "Mailbox Name : " + $MailboxName $folderid = new-object Microsoft.Exchange.WebServi

Digging a little deeper to look to see if a mailbox is being used with the EWS Managed API and Powershell

Change is one of the universal constants that we all must constantly deal within our working lives, another one is poor communication and dysfunctions HR departments bit like death and tax's really. This often leads to us hapless mail administrator wondering why when company staff numbers remain stable the number of mailboxes seem to grow exponentially over time. Those that seek to find unused mailboxes are often confronted with a somewhat challenging task because of the nature of the challenging environment we work in for example sickness, maternity (and paternity leave), gap years and a number of other flexible work scenarios where mailboxes may appear to be unused but should not be deleted. Over the last decade I've had a few cracks at writing scripts to do this at first just looking at the number of unread email, the looking at both send and received and then finally looking at all of these and then the last logon time while all shared some modicum of success at time they f

Outlook Anywhere logon report powershell GUI

One of all the more useful reasons to learn scripting is the ability to turn information that is recorded in one format in a seemless useless rable of bits, into a format this is more useful to ordinary humans in everyday situations. One the examples of this are the IIS logs which in Exchange contain information about users accessing OWA, Accessing ActiveSync and Outlook Anywhere. Like everything in IT there are a few ways of tackling how you go about turing log information into something useful, one of the more popular ways to do this is using the Log parser which is a brilliant tool for those that aren't comfortable doing a lot of coding. You cant beat this tool for speed and efficiency and if your parsing logs often you should learn to use it. More recently the exLogAnalyser has been released which is interesting and it looks like a really great piece of coding that lacks a very very important ingredients for a tool like this. The documentation is spartan and it was written
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.