http://www.infini-tec.de/
InfiniTec - Henning Krauses Blog - Exchange utilities
2005-12-26T11:00:00+00:00
Don't adjust your mind - it's reality that is malfunctioning
Henning Krause
BlogEngine.Net Syndication Generator
http://www.infini-tec.de/opml.axd
Henning Krause
Don't adjust your mind - it's reality that is malfunctioning
en-US
InfiniTec - Henning Krauses Blog
0.000000
0.000000
http://www.infini-tec.de/post/2005/02/26/ExCmd.aspx
ExCmd
2005-02-25T23:00:00+00:00
hkrause
<h2 xmlns="http://www.w3.org/1999/xhtml">Features</h2><div xmlns="http://www.w3.org/1999/xhtml">
<ul style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">
<li class="clsListItem">Issue PROPFIND, PROPPATCH, MKCOL and all the other WebDAV commands on any exchange folder. </li>
<li class="clsListItem">Issue GET and PUT methods to retrieve and update attachments on a file </li>
<li class="clsListItem">Support for various authentication schemes like BASE, NTLM and Form-Based authentication </li>
<li class="clsListItem">Use of variables within the command files which are replaced before the command is passed to the server. </li>
<li class="clsListItem">The response to a WebDAV command is normally a XML file. In conjunction with <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=2fb55371-c94e-4373-b0e9-db4816552e41&DisplayLang=en">msxsl</a>, this tool becomes even more powerful because the responses can be transformed into other representations like HTML or even as input for new commands. </li></ul>
</div><h2 xmlns="http://www.w3.org/1999/xhtml">Examples</h2><div xmlns="http://www.w3.org/1999/xhtml">
<p class="clsPara">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 <strong>Inbox</strong>, but on a german installation, this folder is called <strong>Posteingang</strong>. To get this information, simply use the <strong>getproperty.xml</strong> as command file:</p>
<div class="clsCode" style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #f0f0f0">
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 1</span> ExCmd PROPFIND http://contoso/exchange/administrator /c:getproperty.xml ns="urn:schemas:httpmail:" name="inbox"</span></p></div>
<p class="clsPara">In the case of my test environment the answer was this:</p>
<div class="clsCode" style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #f0f0f0">
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 1</span> <span style="color: #0000ff;"><?</span><span style="color: #800000;">xml</span><span style="color: #0000ff;"> </span><span style="color: #ff0000;">version</span><span style="color: #0000ff;">=</span>"<span style="color: #0000ff;">1.0</span>"<span style="color: #0000ff;"> </span><span style="color: #ff0000;">encoding</span><span style="color: #0000ff;">=</span>"<span style="color: #0000ff;">ibm850</span>"<span style="color: #0000ff;">?></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 2</span> <span style="color: #0000ff;"><</span><span style="color: #800000;">a:multistatus</span><span style="color: #0000ff;"> </span><span style="color: #ff0000;">xmlns:b</span><span style="color: #0000ff;">=</span>"<span style="color: #0000ff;">urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/</span>"<span style="color: #0000ff;"> </span><span style="color: #ff0000;">xmlns:d</span><span style="color: #0000ff;">=</span>"<span style="color: #0000ff;">urn:schemas:httpmail:</span>"<span style="color: #0000ff;"> </span><span style="color: #ff0000;">xmlns:c</span><span style="color: #0000ff;">=</span>"<span style="color: #0000ff;">xml:</span>"<span style="color: #0000ff;"> </span><span style="color: #ff0000;">xmlns:a</span><span style="color: #0000ff;">=</span>"<span style="color: #0000ff;">DAV:</span>"<span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 3</span> <span style="color: #0000ff;"> <</span><span style="color: #800000;">a:response</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 4</span> <span style="color: #0000ff;"> <</span><span style="color: #800000;">a:href</span><span style="color: #0000ff;">></span>http://contoso/exchange/administrator/<span style="color: #0000ff;"></</span><span style="color: #800000;">a:href</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 5</span> <span style="color: #0000ff;"> <</span><span style="color: #800000;">a:propstat</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 6</span> <span style="color: #0000ff;"> <</span><span style="color: #800000;">a:status</span><span style="color: #0000ff;">></span>HTTP/1.1 200 OK<span style="color: #0000ff;"></</span><span style="color: #800000;">a:status</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 7</span> <span style="color: #0000ff;"> <</span><span style="color: #800000;">a:prop</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 8</span> <span style="color: #0000ff;"> <</span><span style="color: #800000;">d:inbox</span><span style="color: #0000ff;">></span> http://contoso/exchange/administrator/Posteingang<span style="color: #0000ff;"></</span><span style="color: #800000;">d:inbox</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 9</span> <span style="color: #0000ff;"> </</span><span style="color: #800000;">a:prop</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 10</span> <span style="color: #0000ff;"> </</span><span style="color: #800000;">a:propstat</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 11</span> <span style="color: #0000ff;"> </</span><span style="color: #800000;">a:response</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 12</span> <span style="color: #0000ff;"></</span><span style="color: #800000;">a:multistatus</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 13</span> </span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 14</span> The command completed Successfully.</span></p></div>
<p class="clsPara">The contents of the getproperty.xml are like this:</p>
<div class="clsCode" style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #f0f0f0">
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 1</span> <span style="color: #0000ff;"><?</span><span style="color: #800000;">xml</span><span style="color: #0000ff;"> </span><span style="color: #ff0000;">version</span><span style="color: #0000ff;">=</span>"<span style="color: #0000ff;">1.0</span>"<span style="color: #0000ff;"> </span><span style="color: #ff0000;">encoding</span><span style="color: #0000ff;">=</span>"<span style="color: #0000ff;">utf-8</span>"<span style="color: #0000ff;"> ?></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 2</span> <span style="color: #0000ff;"><</span><span style="color: #800000;">a:propfind</span><span style="color: #0000ff;"> </span><span style="color: #ff0000;">xmlns:a</span><span style="color: #0000ff;">=</span>"<span style="color: #0000ff;">DAV:</span>"</span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 3</span> <span style="color: #0000ff;"> <</span><span style="color: #800000;">a:prop</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 4</span> <span style="color: #0000ff;"> <</span>%<span style="color: #800000;">name</span>%<span style="color: #0000ff;"> </span><span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">=</span>"<span style="color: #0000ff;">%ns%</span>"<span style="color: #0000ff;"> /></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 5</span> <span style="color: #0000ff;"> </</span><span style="color: #800000;">a:prop</span><span style="color: #0000ff;">></span></span></p>
<p style="PADDING-RIGHT: 0px; MARGIN-TOP: 0px; PADDING-LEFT: 2cm; MARGIN-BOTTOM: 0px; TEXT-INDENT: -2cm"><span style="font-family: Courier New;"><span style="color: #2b91af;"> 6</span> <span style="color: #0000ff;"></</span><span style="color: #800000;">a:propfind</span><span style="color: #0000ff;">></span></span></p></div>
<p class="clsPara">So, there are two variables which are replaced before the request is transmitted to the server.</p>
</div><h2 xmlns="http://www.w3.org/1999/xhtml">Changelog</h2><div xmlns="http://www.w3.org/1999/xhtml">
<h3>1.3.1885.37559 – Feb 28, 2005</h3><div>
<ul style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" type="disc">
<li class="clsPara">Added a new switch: /h. This allows the specification of additional headers that should be sent along with the request.</li></ul>
</div><h3>1.2.1883.23641 – Feb 26, 2005</h3><div>
<ul style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" type="disc">
<li>Initial Release</li></ul>
</div></div><h2 xmlns="http://www.w3.org/1999/xhtml">Downloads</h2><table xmlns="http://www.w3.org/1999/xhtml"><tr><td><img style="border:none; vertical-align: middle;" src=file.axd?file=excmd/zip.gif /></td><td><a href=file.axd?file=excmd/ExCmd.1.3.1885.37559.zip>ExCmd.1.3.1885.37559.zip</a> (25,400 Bytes)<br />Binaries for version 1.3.1885.37559</td></tr></table>
2005-02-25T23:00:00+00:00
hkrause
The database of Microsoft Exchange 2000/2003 is called WebStorageSystem. This database can be accessed via WebDAV, a HTTP related protocol. This program allows you to issue both, HTTP and WebDAV requests against an exchange public or private folder from the commandline.
http://www.infini-tec.de/pingback.axd
http://www.infini-tec.de/post.aspx?id=80e17d54-b016-4d01-bd9e-b54b6db416e6
2
http://www.infini-tec.de/trackback.axd?id=80e17d54-b016-4d01-bd9e-b54b6db416e6
http://www.infini-tec.de/post/2005/02/26/ExCmd.aspx#comment
http://www.infini-tec.de/syndication.axd?post=80e17d54-b016-4d01-bd9e-b54b6db416e6