Skip to main content

Posts

Showing posts from April, 2006

Exchange Where is scripted Instant Message response Bot using LCS and Communicator Web Access (Ajax)

In my pervious post I showed how to create a simple LCS scripted response bot that did something a little bit boring such as tell you what day it is. Presence technology is something that’s changing and growing all the time the Outlook integration of the Office 2005 communicator is one example. The script is partially inspired by this but I decided to see if I could push the limits when it comes to privacy and the presence type information that is available to system administrators that you may not think normally about using. So what does this bot do ? The bot allows you to ask it the question where is fred@domain.com. It then takes this information and does the following First it queries the calendar to see if they are currently in an appointment and creates a response that shows details of the appointment a person may currently be attending and the location that appointment is and what time it started and finished. It also sends a full list of their calendar appointments over the ne

Simple scripted Instant Message response Bot using LCS and Communicator Web Access (Ajax)

Continuing on from the other week I’ve been playing around further with the new Ajax interface for LCS communicator web access. Response bots are not only a lot of fun to play around with but can be a practical way of getting a little bit more out of an Instant messaging system. Like the send message script this script works by using the browser object to post and get data to the LCS Communicator Web Access server. The script is a little crude in some aspects for some reason the XML returned from LCS does seem to parse well so I’ve used a cruder text parse method to interpret the server responses. I have really only tested this in one environment so this logic may fall down in other environments where there are some differing variables. The first section of the script logs on to the web access server using NTLM over https and most importantly retrieves the latestupdate id which must be posted with every request to the server. The reasons why you need to do this and how the timeouts wor

Removing Disabled Users from Distribution lists via a script

One thing that I seem to do with monotonous regularity is disable user accounts as people churn though the companies that I work for. Usually once an account is disabled the chances of it being re-enabled while possible are always slim. One of the things that mostly gets forgotten when disabling an account is to also remove it from any distribution lists that account maybe in. Now with the new hot-fix this is not as much of a problem because a disabled mailbox can now be configured to still receive email. However it is still desirable for these disabled accounts not to be receiving email from distribution lists. Instead of going though each disabled user to work out if it’s a member of any distribution list and then remove it I decided to create a script that would fist let me list all the disable users that are in a distribution lists and also have an option so it will remove these users from that group. For the script itself I’ve used ADSI and the ADO data shaping provider again. As

Sending an Instant Message via Script using LCS and Communicator Web Access (Ajax)

Its been some time since I had a chance to play around with any LCS code I saw the release of the AJAX SDK so I decided to have a bit of read and see if I could put together a few bits of code. If you’re comfortable writing WebDAV code you’ll feel at home with Ajax its just a matter of posting and getting data via a Http control. Starting real easy I thought I’d try a simple VBS script to send a message from the command line. The script itself is fairly basic it uses NTLM authentication to first logon to a LCS server using the Logon URL. After it logs on successfully you need to get the cookie for the session which is used when calling any further functions. To send a message the StartIm method is used which basically tries to start an IMSession along with sending a message. The last section of code then calls the logoff URL. Before you run the script you need to configure the hardcoded variables in the config section basically you need to put in the name of the LCS CWA server Servern
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.