InfiniTec - Henning Krauses Blog

Don't adjust your mind - it's reality that is malfunctioning

ExCmd

Features

  • Issue PROPFIND, PROPPATCH, MKCOL and all the other WebDAV commands on any exchange folder.
  • Issue GET and PUT methods to retrieve and update attachments on a file
  • Support for various authentication schemes like BASE, NTLM and Form-Based authentication
  • Use of variables within the command files which are replaced before the command is passed to the server.
  • The response to a WebDAV command is normally a XML file. In conjunction with msxsl, this tool becomes even more powerful because the responses can be transformed into other representations like HTML or even as input for new commands.

Examples

The download link below contains three xml files which you can use as a start. Consider you want to get the name of the default inbox folder. On an English installation this would be Inbox, but on a german installation, this folder is called Posteingang. To get this information, simply use the getproperty.xml as command file:

    1 ExCmd PROPFIND http://contoso/exchange/administrator /c:getproperty.xml ns="urn:schemas:httpmail:" name="inbox"

In the case of my test environment the answer was this:

    1 <?xml version="1.0" encoding="ibm850"?>

    2 <a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" xmlns:d="urn:schemas:httpmail:" xmlns:c="xml:" xmlns:a="DAV:">

    3   <a:response>

    4     <a:href>http://contoso/exchange/administrator/</a:href>

    5     <a:propstat>

    6       <a:status>HTTP/1.1 200 OK</a:status>

    7       <a:prop>

    8         <d:inbox> http://contoso/exchange/administrator/Posteingang</d:inbox>

    9       </a:prop>

   10     </a:propstat>

   11   </a:response>

   12 </a:multistatus>

   13 

   14 The command completed Successfully.

The contents of the getproperty.xml are like this:

    1 <?xml version="1.0" encoding="utf-8" ?>

    2 <a:propfind xmlns:a="DAV:"

    3   <a:prop>

    4     <%name% xmlns="%ns%" />

    5   </a:prop>

    6 </a:propfind>

So, there are two variables which are replaced before the request is transmitted to the server.

Changelog

1.3.1885.37559 – Feb 28, 2005

  • Added a new switch: /h. This allows the specification of additional headers that should be sent along with the request.

1.2.1883.23641 – Feb 26, 2005

  • Initial Release

Downloads

ExCmd.1.3.1885.37559.zip (25,400 Bytes)
Binaries for version 1.3.1885.37559

Technorati:

Posted by Henning Krause on Saturday, February 26, 2005 12:00 AM, last modified on Monday, December 26, 2005 12:00 PM
Permalink | Post RSSRSS comment feed