<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/3.3.3" -->
<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel rdf:about="http://blog.mattsampson.net/index.php?blog=1">
	<title>Matt's Blog</title>
	<link>http://blog.mattsampson.net/index.php?blog=1</link>
	<description></description>
	<dc:language>en-GB</dc:language>
	<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=3.3.3"/>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
	<items>
		<rdf:Seq>
					<rdf:li rdf:resource="http://blog.mattsampson.net/index.php/2010/08/05/querying_active_directory_through_sql_se?blog=1"/>
					<rdf:li rdf:resource="http://blog.mattsampson.net/index.php/2010/07/12/windows_2008_r2_scheduled_task_won_t_run?blog=1"/>
					<rdf:li rdf:resource="http://blog.mattsampson.net/index.php/2010/07/06/remove_exchange_2007_mailbox_role_fails__0?blog=1"/>
					<rdf:li rdf:resource="http://blog.mattsampson.net/index.php/2010/07/06/when_you_try_to_uninstall_exchange_serve?blog=1"/>
					<rdf:li rdf:resource="http://blog.mattsampson.net/index.php/2010/06/22/owa_message_next_and_previous_arrows_not?blog=1"/>
					<rdf:li rdf:resource="http://blog.mattsampson.net/index.php/2010/06/22/opening_other_users_inboxes_mailboxes_us_2010?blog=1"/>
					<rdf:li rdf:resource="http://blog.mattsampson.net/index.php/2010/06/20/circular_logging_exchange_2010?blog=1"/>
					<rdf:li rdf:resource="http://blog.mattsampson.net/index.php/2010/06/07/how_to_send_email_using_telnet?blog=1"/>
				</rdf:Seq>
	</items>
</channel>

<item rdf:about="http://blog.mattsampson.net/index.php/2010/08/05/querying_active_directory_through_sql_se?blog=1">
	<title>Querying Active Directory Through SQL Server</title>
	<link>http://blog.mattsampson.net/index.php/2010/08/05/querying_active_directory_through_sql_se?blog=1</link>
	<dc:date>2010-08-05T14:37:15Z</dc:date>	<dc:creator>admin</dc:creator>
	<dc:subject>Server Stuff</dc:subject>
		<description>&lt;p&gt;Thanks to Boyan for help with this.&lt;br /&gt;
&lt;a href=&quot;http://sql.dzone.com/news/querying-active-directory-thro&quot;&gt;http://sql.dzone.com/news/querying-active-directory-thro&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Integrating your application with Active Directory (or another LDAP based directory) is a common requirement in many business applications. Almost every language has a way to query LDAP but little known is the approach of integrating SQL Server with your LDAP controller. This quick article will guide you through setting up and using LDAP queries through SQL Server with Active Directory as the LDAP controller. &lt;/p&gt;

&lt;p&gt;- In SQL server Management Studio, go to Server Objects, Linked Servers, and right click ADSI, go to Properties.&lt;br /&gt;
- Go to Security, Add mapping, Local Login - &amp;#8220;Whatever you want&amp;#8221; in my case schoolpostadmin, Then put the remote user that you want to run the login + password.&lt;/p&gt;

&lt;p&gt;Now run this on the server you want use:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_long&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;declare @linkedServerSql nvarchar(4000),&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;@linkedServerName varchar(100),&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;@localSqlUsername varchar(100),&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc4&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;@domainUsername varchar(100),&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc5&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;@domainUserPassword varchar(100)&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc6&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc7&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;-- Set the local sql server user&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc8&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;set @localSqlUsername = 'sqlUser'&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc9&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;-- format can be 'domainName\userName' or 'userName@domainName'&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc0&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;set @domainUsername = 'domainName\userName'&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;set @domainUserPassword = 'domainUserPassword'&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;set @linkedServerName = 'adsi'&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc4&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc5&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;set @linkedServerSql = '&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc6&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;exec sp_addlinkedserver&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc7&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;''' + @linkedServerName + ''',&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc8&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;'''',&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc9&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;''ADSDSOObject'',&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc0&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;'''' &lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;exec sp_addlinkedsrvlogin&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;''' + @linkedServerName + ''',&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc4&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;false,&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc5&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;''' + @localSqlUsername + ''',&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc6&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;''' + @domainUsername + ''',&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc7&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;''' + @domainUserPassword + ''''&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc8&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc9&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;exec sp_executesql @linkedServerSql&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now just write your query. Eg: &lt;/p&gt;
&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;SELECT&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ad.company AS AccountCode, ad.mail AS Email1, ad.sAMAccountName AS name&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;FROM&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; OPENQUERY(ADSI, 'SELECT mail, sAMAccountName, company FROM ''LDAP://OU=students,DC=school,DC=local'' WHERE objectCategory = ''Person'' AND objectClass = ''user'' ') AS ad&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;ORDER BY Email1&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.mattsampson.net/index.php/2010/08/05/querying_active_directory_through_sql_se?blog=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
	<content:encoded><![CDATA[<p>Thanks to Boyan for help with this.<br />
<a href="http://sql.dzone.com/news/querying-active-directory-thro">http://sql.dzone.com/news/querying-active-directory-thro</a> </p>

<p>Integrating your application with Active Directory (or another LDAP based directory) is a common requirement in many business applications. Almost every language has a way to query LDAP but little known is the approach of integrating SQL Server with your LDAP controller. This quick article will guide you through setting up and using LDAP queries through SQL Server with Active Directory as the LDAP controller. </p>

<p>- In SQL server Management Studio, go to Server Objects, Linked Servers, and right click ADSI, go to Properties.<br />
- Go to Security, Add mapping, Local Login - &#8220;Whatever you want&#8221; in my case schoolpostadmin, Then put the remote user that you want to run the login + password.</p>

<p>Now run this on the server you want use:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_long"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">declare @linkedServerSql nvarchar(4000),</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_default">&#160;&#160;@linkedServerName varchar(100),</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc3"></div></td><td><code><span class="amc_default">&#160;&#160;@localSqlUsername varchar(100),</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc4"></div></td><td><code><span class="amc_default">&#160;&#160;@domainUsername varchar(100),</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc5"></div></td><td><code><span class="amc_default">&#160;&#160;@domainUserPassword varchar(100)</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc6"></div></td><td><code>&nbsp;</code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc7"></div></td><td><code><span class="amc_default">-- Set the local sql server user</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc8"></div></td><td><code><span class="amc_default">set @localSqlUsername = 'sqlUser'</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc9"></div></td><td><code><span class="amc_default">-- format can be 'domainName\userName' or 'userName@domainName'</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc0"><div class="amc1"></div></div></td><td><code><span class="amc_default">set @domainUsername = 'domainName\userName'</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc1"><div class="amc1"></div></div></td><td><code><span class="amc_default">set @domainUserPassword = 'domainUserPassword'</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"><div class="amc1"></div></div></td><td><code>&nbsp;</code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc3"><div class="amc1"></div></div></td><td><code><span class="amc_default">set @linkedServerName = 'adsi'</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc4"><div class="amc1"></div></div></td><td><code>&nbsp;</code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc5"><div class="amc1"></div></div></td><td><code><span class="amc_default">set @linkedServerSql = '</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc6"><div class="amc1"></div></div></td><td><code><span class="amc_default">&#160;&#160;exec sp_addlinkedserver</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc7"><div class="amc1"></div></div></td><td><code><span class="amc_default">&#160;&#160;''' + @linkedServerName + ''',</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc8"><div class="amc1"></div></div></td><td><code><span class="amc_default">&#160;&#160;'''',</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc9"><div class="amc1"></div></div></td><td><code><span class="amc_default">&#160;&#160;''ADSDSOObject'',</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc0"><div class="amc2"></div></div></td><td><code><span class="amc_default">&#160;&#160;'''' </span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc1"><div class="amc2"></div></div></td><td><code>&nbsp;</code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"><div class="amc2"></div></div></td><td><code><span class="amc_default">exec sp_addlinkedsrvlogin</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc3"><div class="amc2"></div></div></td><td><code><span class="amc_default">&#160;&#160;''' + @linkedServerName + ''',</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc4"><div class="amc2"></div></div></td><td><code><span class="amc_default">&#160;&#160;false,</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc5"><div class="amc2"></div></div></td><td><code><span class="amc_default">&#160;&#160;''' + @localSqlUsername + ''',</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc6"><div class="amc2"></div></div></td><td><code><span class="amc_default">&#160;&#160;''' + @domainUsername + ''',</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc7"><div class="amc2"></div></div></td><td><code><span class="amc_default">&#160;&#160;''' + @domainUserPassword + ''''</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc8"><div class="amc2"></div></div></td><td><code>&nbsp;</code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc9"><div class="amc2"></div></div></td><td><code><span class="amc_default">exec sp_executesql @linkedServerSql</span></code></td></tr>
</table></div>

<p>Now just write your query. Eg: </p>
<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">SELECT&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ad.company AS AccountCode, ad.mail AS Email1, ad.sAMAccountName AS name</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_default">FROM&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; OPENQUERY(ADSI, 'SELECT mail, sAMAccountName, company FROM ''LDAP://OU=students,DC=school,DC=local'' WHERE objectCategory = ''Person'' AND objectClass = ''user'' ') AS ad</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc3"></div></td><td><code><span class="amc_default">ORDER BY Email1</span></code></td></tr>
</table></div>


<div class="item_footer"><p><small><a href="http://blog.mattsampson.net/index.php/2010/08/05/querying_active_directory_through_sql_se?blog=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
			</item>

<item rdf:about="http://blog.mattsampson.net/index.php/2010/07/12/windows_2008_r2_scheduled_task_won_t_run?blog=1">
	<title>Windows 2008 R2 - Scheduled task won't run .bat file</title>
	<link>http://blog.mattsampson.net/index.php/2010/07/12/windows_2008_r2_scheduled_task_won_t_run?blog=1</link>
	<dc:date>2010-07-12T14:29:03Z</dc:date>	<dc:creator>admin</dc:creator>
	<dc:subject>Server Stuff</dc:subject>
		<description>
&lt;p&gt;For some reason, scheduled tasks don&amp;#8217;t run out of the box with Windows 2008 R2.&lt;br /&gt;
The main reason for me was that it needed to have the &amp;#8220;start in&amp;#8221; specified.&lt;br /&gt;
Listed below are some from forums I searched. Most shouldn&amp;#8217;t be required, but probably number 2!&lt;/p&gt;

&lt;p&gt;1) Make sure that the task is set to &amp;#8220;configure for Windows Vista or Windows 2008&amp;Prime; on the first page of the task properties (under the &amp;#8220;general&amp;#8221; tab)&lt;br /&gt;
2) Make sure that the task is set to &amp;#8220;start in&amp;#8221; the folder that contains the batch file: open the task properties, click on the &amp;#8220;actions&amp;#8221; tab, click on the action and then the &amp;#8220;edit&amp;#8221; button at the bottom.  In the &amp;#8220;Edit Action&amp;#8221; Window there is a field for &amp;#8220;start in (optional)&amp;#8221; that you set to the path to the batch file.&lt;br /&gt;
3) Make sure that the task is running as an account that has explicit &amp;#8220;Full access&amp;#8221; permissions to all these things:  The .bat file itself,  the folder containing the .bat file, and the target files/folders that are affected by the .bat script.  Inherited permissions didn&amp;#8217;t seem to work for me.&lt;br /&gt;
4) Make sure that the account running the task is a member of the local &amp;#8220;administrators&amp;#8221; group for this machine&lt;br /&gt;
5) Make sure that the task is set to &amp;#8220;run whether logged on or not&amp;#8221;&lt;br /&gt;
6) The Task should run successfully with expected output when you right-click on the task and select &amp;#8220;run&amp;#8221;  If it does that then it will run successfully when you are logged off.&lt;/p&gt;
&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.mattsampson.net/index.php/2010/07/12/windows_2008_r2_scheduled_task_won_t_run?blog=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
	<content:encoded><![CDATA[
<p>For some reason, scheduled tasks don&#8217;t run out of the box with Windows 2008 R2.<br />
The main reason for me was that it needed to have the &#8220;start in&#8221; specified.<br />
Listed below are some from forums I searched. Most shouldn&#8217;t be required, but probably number 2!</p>

<p>1) Make sure that the task is set to &#8220;configure for Windows Vista or Windows 2008&Prime; on the first page of the task properties (under the &#8220;general&#8221; tab)<br />
2) Make sure that the task is set to &#8220;start in&#8221; the folder that contains the batch file: open the task properties, click on the &#8220;actions&#8221; tab, click on the action and then the &#8220;edit&#8221; button at the bottom.  In the &#8220;Edit Action&#8221; Window there is a field for &#8220;start in (optional)&#8221; that you set to the path to the batch file.<br />
3) Make sure that the task is running as an account that has explicit &#8220;Full access&#8221; permissions to all these things:  The .bat file itself,  the folder containing the .bat file, and the target files/folders that are affected by the .bat script.  Inherited permissions didn&#8217;t seem to work for me.<br />
4) Make sure that the account running the task is a member of the local &#8220;administrators&#8221; group for this machine<br />
5) Make sure that the task is set to &#8220;run whether logged on or not&#8221;<br />
6) The Task should run successfully with expected output when you right-click on the task and select &#8220;run&#8221;  If it does that then it will run successfully when you are logged off.</p>
<div class="item_footer"><p><small><a href="http://blog.mattsampson.net/index.php/2010/07/12/windows_2008_r2_scheduled_task_won_t_run?blog=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
			</item>

<item rdf:about="http://blog.mattsampson.net/index.php/2010/07/06/remove_exchange_2007_mailbox_role_fails__0?blog=1">
	<title>Remove Exchange 2007 Mailbox Role Fails with error : Object is read only because it was created by a future version of Exchange: 0.10 (14.0.100.0). Current supported version is 0.1 (8.0.535.0). </title>
	<link>http://blog.mattsampson.net/index.php/2010/07/06/remove_exchange_2007_mailbox_role_fails__0?blog=1</link>
	<dc:date>2010-07-06T08:55:38Z</dc:date>	<dc:creator>admin</dc:creator>
	<dc:subject>Tech Stuff</dc:subject>
		<description>&lt;p&gt;You may receive an Error when Exchange 2010 is installed and you want to remove an Exchange 2007 Mailbox Role!&lt;/p&gt;


&lt;p&gt;&lt;b&gt;Mailbox Role Failed &lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Error: &lt;br /&gt;
Object is read only because it was created by a future version of Exchange: 0.10 (14.0.100.0). Current supported version is 0.1 (8.0.535.0).&lt;/p&gt;


&lt;p&gt;A closer look at the ExchangeSetup.txt tells me something about the Offline Address book and Public Folder store:&lt;/p&gt;

&lt;p&gt;[28/10/2009 21:37:05] [2] Checking whether the public folder database &amp;#8220;MB\Public Folder Storage Group\Public Folder Database&amp;#8221; has local replicas. &lt;br /&gt;
[28/10/2009 21:37:06] [2] Searching objects of type &amp;#8220;OfflineAddressBook&amp;#8221; with filter &amp;#8220;(PublicFolderDatabase Equal MB\Public Folder Storage Group\Public Folder Database)&quot;, scope &amp;#8220;SubTree&amp;#8221; under the root &amp;#8220;Delimon Organization&quot;. &lt;br /&gt;
[28/10/2009 21:37:06] [2] Previous operation run on domain controller &amp;#8216;x.delimon.be&amp;#8217;. &lt;br /&gt;
[28/10/2009 21:37:06] [2] [ERROR] Object is read only because it was created by a future version of Exchange: 0.10 (14.0.100.0). Current supported version is 0.1 (8.0.535.0).&lt;/p&gt;


&lt;p&gt;Opening the Offline Addressbook settings with Exchange 2007 Management Console also spawns the same error and makes the configuration Read Only.&lt;/p&gt;


&lt;p&gt;So lets remove the Exchange 2007 CAS Server from the AOB Distribution and disable Public Folder Distribution with the Exchange 2010 Management Console&amp;#8230; &lt;br /&gt;
That did not change anything &lt;img src=&quot;http://blog.mattsampson.net/rsc/smilies/icon_sad.gif&quot; alt=&quot;&amp;#58;&amp;#40;&quot; class=&quot;middle&quot; /&gt;&lt;/p&gt;



&lt;p&gt;So lets remove the Public Folder Database with ADSIEDIT.MSC &lt;br /&gt;
(Connect to the Configuration Container)&lt;/p&gt;

&lt;p&gt;IMPORTANT : You must have moved all PF data to another server, this will destroy your PF Database. &lt;br /&gt;
(In my case all information was already moved)&lt;/p&gt;


&lt;p&gt;Now that replication has finished you can see that the Public Folder DB is no longer available&lt;/p&gt;

&lt;p&gt;So now let&amp;#8217;s retry the uninstall&amp;#8230; &lt;/p&gt;

&lt;p&gt;That worked out great &lt;img src=&quot;http://blog.mattsampson.net/rsc/smilies/icon_smile.gif&quot; alt=&quot;&amp;#58;&amp;#41;&quot; class=&quot;middle&quot; /&gt; &lt;br /&gt;
You can see below that the Exchange 2007 Mailbox Server has been removed from the Exchange Configuration &lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;br /&gt;
Conclusion:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;If you have a public folder on your mailbox server then the Uninstallation of Exchange 2007 Mailbox Server may fail if Exchange 2010 is already deployed. &lt;br /&gt;
My guess is that Microsoft will release an update installer/uninstaller that does not fail on the Offline Address book/Public Folder info that was upgraded to Exchange 2010 version information in AD&lt;/p&gt;

&lt;p&gt;Using ADSIEDIT.MSC should not be considered a supported solution, this is only a workaround!&lt;/p&gt;


&lt;p&gt;Thanks to Johan for this one - : &lt;a href=&quot;http://www.proexchange.be/blogs/exchange2010/archive/2009/10/28/remove-exchange-2007-mailbox-role-fails-with-error-object-is-read-only-because-it-was-created-by-a-future-version-of-exchange-0-10-14-0-100-0-current-supported-version-is-0-1-8-0-535-0.aspx&quot;&gt;http://www.proexchange.be/blogs/exchange2010/archive/2009/10/28/remove-exchange-2007-mailbox-role-fails-with-error-object-is-read-only-because-it-was-created-by-a-future-version-of-exchange-0-10-14-0-100-0-current-supported-version-is-0-1-8-0-535-0.aspx &lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.mattsampson.net/index.php/2010/07/06/remove_exchange_2007_mailbox_role_fails__0?blog=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
	<content:encoded><![CDATA[<p>You may receive an Error when Exchange 2010 is installed and you want to remove an Exchange 2007 Mailbox Role!</p>


<p><b>Mailbox Role Failed </b></p>

<p>Error: <br />
Object is read only because it was created by a future version of Exchange: 0.10 (14.0.100.0). Current supported version is 0.1 (8.0.535.0).</p>


<p>A closer look at the ExchangeSetup.txt tells me something about the Offline Address book and Public Folder store:</p>

<p>[28/10/2009 21:37:05] [2] Checking whether the public folder database &#8220;MB\Public Folder Storage Group\Public Folder Database&#8221; has local replicas. <br />
[28/10/2009 21:37:06] [2] Searching objects of type &#8220;OfflineAddressBook&#8221; with filter &#8220;(PublicFolderDatabase Equal MB\Public Folder Storage Group\Public Folder Database)", scope &#8220;SubTree&#8221; under the root &#8220;Delimon Organization". <br />
[28/10/2009 21:37:06] [2] Previous operation run on domain controller &#8216;x.delimon.be&#8217;. <br />
[28/10/2009 21:37:06] [2] [ERROR] Object is read only because it was created by a future version of Exchange: 0.10 (14.0.100.0). Current supported version is 0.1 (8.0.535.0).</p>


<p>Opening the Offline Addressbook settings with Exchange 2007 Management Console also spawns the same error and makes the configuration Read Only.</p>


<p>So lets remove the Exchange 2007 CAS Server from the AOB Distribution and disable Public Folder Distribution with the Exchange 2010 Management Console&#8230; <br />
That did not change anything <img src="http://blog.mattsampson.net/rsc/smilies/icon_sad.gif" alt="&#58;&#40;" class="middle" /></p>



<p>So lets remove the Public Folder Database with ADSIEDIT.MSC <br />
(Connect to the Configuration Container)</p>

<p>IMPORTANT : You must have moved all PF data to another server, this will destroy your PF Database. <br />
(In my case all information was already moved)</p>


<p>Now that replication has finished you can see that the Public Folder DB is no longer available</p>

<p>So now let&#8217;s retry the uninstall&#8230; </p>

<p>That worked out great <img src="http://blog.mattsampson.net/rsc/smilies/icon_smile.gif" alt="&#58;&#41;" class="middle" /> <br />
You can see below that the Exchange 2007 Mailbox Server has been removed from the Exchange Configuration </p>

<p><b><br />
Conclusion:</b></p>

<p>If you have a public folder on your mailbox server then the Uninstallation of Exchange 2007 Mailbox Server may fail if Exchange 2010 is already deployed. <br />
My guess is that Microsoft will release an update installer/uninstaller that does not fail on the Offline Address book/Public Folder info that was upgraded to Exchange 2010 version information in AD</p>

<p>Using ADSIEDIT.MSC should not be considered a supported solution, this is only a workaround!</p>


<p>Thanks to Johan for this one - : <a href="http://www.proexchange.be/blogs/exchange2010/archive/2009/10/28/remove-exchange-2007-mailbox-role-fails-with-error-object-is-read-only-because-it-was-created-by-a-future-version-of-exchange-0-10-14-0-100-0-current-supported-version-is-0-1-8-0-535-0.aspx">http://www.proexchange.be/blogs/exchange2010/archive/2009/10/28/remove-exchange-2007-mailbox-role-fails-with-error-object-is-read-only-because-it-was-created-by-a-future-version-of-exchange-0-10-14-0-100-0-current-supported-version-is-0-1-8-0-535-0.aspx </a></p><div class="item_footer"><p><small><a href="http://blog.mattsampson.net/index.php/2010/07/06/remove_exchange_2007_mailbox_role_fails__0?blog=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
			</item>

<item rdf:about="http://blog.mattsampson.net/index.php/2010/07/06/when_you_try_to_uninstall_exchange_serve?blog=1">
	<title>When you try to uninstall Exchange Server 2007, the uninstall operation stops responding when it runs the task to remove Exchange files</title>
	<link>http://blog.mattsampson.net/index.php/2010/07/06/when_you_try_to_uninstall_exchange_serve?blog=1</link>
	<dc:date>2010-07-06T08:53:43Z</dc:date>	<dc:creator>admin</dc:creator>
	<dc:subject>Exchange</dc:subject>
		<description>&lt;p&gt;When you try to uninstall Exchange Server 2007, the uninstall operation stops responding when it runs the task to remove Exchange files&lt;/p&gt;


&lt;p&gt;&lt;b&gt;SYMPTOMS&lt;/b&gt;&lt;br /&gt;
You start to uninstall Microsoft Exchange Server 2007 by using the Add or Remove Programs item in Control Panel. When you do this, the following tasks are completed successfully:&lt;br /&gt;
All server roles are removed.&lt;br /&gt;
The Exchange organization is removed.&lt;br /&gt;
However, the uninstall operation stops responding when it runs the task to remove Exchange files. Although the progress bar indicates that 100 percent of the task is completed, the operation does not continue to the next step.&lt;/p&gt;

&lt;p&gt;Additionally, when you open Task Manager, the Powershell.exe process constantly displays 25 percent CPU usage.&lt;/p&gt;


&lt;p&gt;&lt;b&gt;CAUSE&lt;/b&gt;&lt;br /&gt;
This problem occurs because a custom action invokes the Powershell.exe process but never executes the action.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;RESOLUTION&lt;/b&gt;&lt;br /&gt;
To resolve this problem, open Task Manager, and then end the Powershell.exe process. The Powershell.exe process will restart immediately and then complete the uninstall operation.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;STATUS&lt;/b&gt;&lt;br /&gt;
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &amp;#8220;Applies to&amp;#8221; section.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;MORE INFORMATION&lt;/b&gt;&lt;br /&gt;
For more information about how to completely remove Exchange Server 2007, visit the following Microsoft Web site: &lt;br /&gt;
&lt;a href=&quot;http://technet.microsoft.com/en-us/library/bb123893.aspx&quot;&gt;http://technet.microsoft.com/en-us/library/bb123893.aspx&lt;/a&gt; (http://technet.microsoft.com/en-us/library/bb123893.aspx) &lt;br /&gt;
Back to the top&lt;/p&gt;
&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.mattsampson.net/index.php/2010/07/06/when_you_try_to_uninstall_exchange_serve?blog=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
	<content:encoded><![CDATA[<p>When you try to uninstall Exchange Server 2007, the uninstall operation stops responding when it runs the task to remove Exchange files</p>


<p><b>SYMPTOMS</b><br />
You start to uninstall Microsoft Exchange Server 2007 by using the Add or Remove Programs item in Control Panel. When you do this, the following tasks are completed successfully:<br />
All server roles are removed.<br />
The Exchange organization is removed.<br />
However, the uninstall operation stops responding when it runs the task to remove Exchange files. Although the progress bar indicates that 100 percent of the task is completed, the operation does not continue to the next step.</p>

<p>Additionally, when you open Task Manager, the Powershell.exe process constantly displays 25 percent CPU usage.</p>


<p><b>CAUSE</b><br />
This problem occurs because a custom action invokes the Powershell.exe process but never executes the action.</p>

<p><b>RESOLUTION</b><br />
To resolve this problem, open Task Manager, and then end the Powershell.exe process. The Powershell.exe process will restart immediately and then complete the uninstall operation.</p>

<p><b>STATUS</b><br />
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &#8220;Applies to&#8221; section.</p>

<p><b>MORE INFORMATION</b><br />
For more information about how to completely remove Exchange Server 2007, visit the following Microsoft Web site: <br />
<a href="http://technet.microsoft.com/en-us/library/bb123893.aspx">http://technet.microsoft.com/en-us/library/bb123893.aspx</a> (http://technet.microsoft.com/en-us/library/bb123893.aspx) <br />
Back to the top</p>
<div class="item_footer"><p><small><a href="http://blog.mattsampson.net/index.php/2010/07/06/when_you_try_to_uninstall_exchange_serve?blog=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
			</item>

<item rdf:about="http://blog.mattsampson.net/index.php/2010/06/22/owa_message_next_and_previous_arrows_not?blog=1">
	<title>OWA message next and previous arrows not working</title>
	<link>http://blog.mattsampson.net/index.php/2010/06/22/owa_message_next_and_previous_arrows_not?blog=1</link>
	<dc:date>2010-06-22T11:55:51Z</dc:date>	<dc:creator>admin</dc:creator>
	<dc:subject>Exchange</dc:subject>
		<description>&lt;p&gt;When logged into OWA 2010 and viewing messages, you are given the arrows to move to the next message item or previous message item.&lt;br /&gt;
Located in the upper right of the message box. Many of our users found them grayed out and could not select.&lt;/p&gt;

&lt;p&gt;We had done an upgrade from exchange 2007 to 2010 but that didn&amp;#8217;t seem to matter as it was not a server problem - some could use them and some could not.&lt;/p&gt;

&lt;p&gt;The solution to this was found in the OWA help feature!&lt;/p&gt;

&lt;p&gt;The reason the &amp;#8220;Previous Item&amp;#8221; &amp;amp; &amp;#8220;Next Item&amp;#8221; buttons are grayed out is because you have the Conversation option selected for the items in that folder (Note: Conversation is selected, by default, for all folders, when your mailbox is upgraded to R4).  &lt;/p&gt;

&lt;p&gt;If you turn it off (i.e. uncheck the check box next to &amp;#8220;Conversation&amp;#8221; or found within the &amp;#8220;Sort&amp;#8221; area - I.e: sort by date, from, to, etc..), then the arrows will work again. &lt;br /&gt;
The way you turn it off is by clicking the dropdown next to where it says &amp;#8220;Arrange by&amp;#8221; and unchecking the check box next to the word &amp;#8220;Conversation&quot;.&lt;/p&gt;
&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.mattsampson.net/index.php/2010/06/22/owa_message_next_and_previous_arrows_not?blog=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
	<content:encoded><![CDATA[<p>When logged into OWA 2010 and viewing messages, you are given the arrows to move to the next message item or previous message item.<br />
Located in the upper right of the message box. Many of our users found them grayed out and could not select.</p>

<p>We had done an upgrade from exchange 2007 to 2010 but that didn&#8217;t seem to matter as it was not a server problem - some could use them and some could not.</p>

<p>The solution to this was found in the OWA help feature!</p>

<p>The reason the &#8220;Previous Item&#8221; &amp; &#8220;Next Item&#8221; buttons are grayed out is because you have the Conversation option selected for the items in that folder (Note: Conversation is selected, by default, for all folders, when your mailbox is upgraded to R4).  </p>

<p>If you turn it off (i.e. uncheck the check box next to &#8220;Conversation&#8221; or found within the &#8220;Sort&#8221; area - I.e: sort by date, from, to, etc..), then the arrows will work again. <br />
The way you turn it off is by clicking the dropdown next to where it says &#8220;Arrange by&#8221; and unchecking the check box next to the word &#8220;Conversation".</p>
<div class="item_footer"><p><small><a href="http://blog.mattsampson.net/index.php/2010/06/22/owa_message_next_and_previous_arrows_not?blog=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
			</item>

<item rdf:about="http://blog.mattsampson.net/index.php/2010/06/22/opening_other_users_inboxes_mailboxes_us_2010?blog=1">
	<title>Opening other users Inboxes/Mailboxes using OWA 2010</title>
	<link>http://blog.mattsampson.net/index.php/2010/06/22/opening_other_users_inboxes_mailboxes_us_2010?blog=1</link>
	<dc:date>2010-06-22T11:27:59Z</dc:date>	<dc:creator>admin</dc:creator>
	<dc:subject>Exchange</dc:subject>
		<description>&lt;p&gt;So as many of you already know, as long as you have the proper permissions, you can access another users Inbox or complete mailbox using the OWA 2010 GUI. To access another users &amp;#8220;Inbox&amp;#8221;, you simply right-click on your mailbox in the navigation pane as shown in the following figure.&lt;br /&gt;
&lt;img src=&quot;http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image.png&quot; alt=&quot;&quot; title=&quot;&quot; /&gt;&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;Specify the alias, username, or e-mail address of the user for which you want to open the Inbox.&lt;br /&gt;
&lt;img src=&quot;http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image1.png&quot; alt=&quot;&quot; title=&quot;&quot; /&gt;&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;When clicking &amp;#8220;OK&amp;#8221;, you will now have access to the Inbox of the specified user via the navigation pane.&lt;br /&gt;
&lt;img src=&quot;http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image2.png&quot; alt=&quot;&quot; title=&quot;&quot; /&gt;&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;The interesting thing about this method is that this will be remembered until you right-click the other user&amp;#8217;s Inbox and select &amp;#8220;Remove from view&amp;#8221;. Even next time you open your mailbox using OWA 2010.&lt;br /&gt;
&lt;img src=&quot;http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image3.png&quot; alt=&quot;&quot; title=&quot;&quot; /&gt;&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;If you want to open the complete mailbox of another user, you should instead click on the drop-down button in the upper right corner and specify the username, alias or e-mail address.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;When clicking &amp;#8220;Open&amp;#8221;, the mailbox of the specified mailbox user will open in the current OWA 2010 browser window.&lt;br /&gt;
&lt;img src=&quot;http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image8.png&quot; alt=&quot;&quot; title=&quot;&quot; /&gt;&lt;br /&gt;
 &lt;/p&gt;



&lt;p&gt;Two very nice features indeed! But what if you want to authenticate directly against another user&amp;#8217;s mailbox on the OWA 2010 FBA page?&lt;/p&gt;

&lt;p&gt;Well, you simply enter the following URL:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://mail.domain.com/owa/e-mail_address_of_mailbox_user&quot;&gt;https://mail.domain.com/owa/e-mail_address_of_mailbox_user&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And there we go.&lt;br /&gt;
&lt;img src=&quot;http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image9.png&quot; alt=&quot;&quot; title=&quot;&quot; /&gt;&lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;{Thanks to Henrik Walther for the above blog post. You can read his original post on &lt;a href=&quot;http://blogs.msexchange.org/walther/2010/01/19/opening-other-users-inboxesmailboxes-using-owa-2010/&quot;&gt;http://blogs.msexchange.org/walther/2010/01/19/opening-other-users-inboxesmailboxes-using-owa-2010/&lt;/a&gt; } &lt;/p&gt;
&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.mattsampson.net/index.php/2010/06/22/opening_other_users_inboxes_mailboxes_us_2010?blog=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
	<content:encoded><![CDATA[<p>So as many of you already know, as long as you have the proper permissions, you can access another users Inbox or complete mailbox using the OWA 2010 GUI. To access another users &#8220;Inbox&#8221;, you simply right-click on your mailbox in the navigation pane as shown in the following figure.<br />
<img src="http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image.png" alt="" title="" /><br />
 </p>

<p>Specify the alias, username, or e-mail address of the user for which you want to open the Inbox.<br />
<img src="http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image1.png" alt="" title="" /><br />
 </p>

<p>When clicking &#8220;OK&#8221;, you will now have access to the Inbox of the specified user via the navigation pane.<br />
<img src="http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image2.png" alt="" title="" /><br />
 </p>

<p>The interesting thing about this method is that this will be remembered until you right-click the other user&#8217;s Inbox and select &#8220;Remove from view&#8221;. Even next time you open your mailbox using OWA 2010.<br />
<img src="http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image3.png" alt="" title="" /><br />
 </p>

<p>If you want to open the complete mailbox of another user, you should instead click on the drop-down button in the upper right corner and specify the username, alias or e-mail address.</p>

<p> </p>

<p>When clicking &#8220;Open&#8221;, the mailbox of the specified mailbox user will open in the current OWA 2010 browser window.<br />
<img src="http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image8.png" alt="" title="" /><br />
 </p>



<p>Two very nice features indeed! But what if you want to authenticate directly against another user&#8217;s mailbox on the OWA 2010 FBA page?</p>

<p>Well, you simply enter the following URL:</p>

<p><a href="https://mail.domain.com/owa/e-mail_address_of_mailbox_user">https://mail.domain.com/owa/e-mail_address_of_mailbox_user</a></p>

<p>And there we go.<br />
<img src="http://blogs.msexchange.org/walther/wp-content/blogs/30/files/2010/01/image9.png" alt="" title="" /><br />
 </p>

<p>{Thanks to Henrik Walther for the above blog post. You can read his original post on <a href="http://blogs.msexchange.org/walther/2010/01/19/opening-other-users-inboxesmailboxes-using-owa-2010/">http://blogs.msexchange.org/walther/2010/01/19/opening-other-users-inboxesmailboxes-using-owa-2010/</a> } </p>
<div class="item_footer"><p><small><a href="http://blog.mattsampson.net/index.php/2010/06/22/opening_other_users_inboxes_mailboxes_us_2010?blog=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
			</item>

<item rdf:about="http://blog.mattsampson.net/index.php/2010/06/20/circular_logging_exchange_2010?blog=1">
	<title>Circular Logging - Exchange 2010</title>
	<link>http://blog.mattsampson.net/index.php/2010/06/20/circular_logging_exchange_2010?blog=1</link>
	<dc:date>2010-06-20T13:30:40Z</dc:date>	<dc:creator>admin</dc:creator>
	<dc:subject>Exchange</dc:subject>
		<description>&lt;p&gt;Although it is not recommend it as a best practice, you can configure Exchange to save disk space by enabling circular logging. Circular logging allows Exchange to overwrite transaction log files after the data that the log files contain has been committed to the database. &lt;/p&gt;

&lt;p&gt;In Exchange 2010, circular logging is disabled by default. By enabling it, you reduce drive storage space requirements. However, without a complete set of transaction log files, you can&amp;#8217;t recover any data more recent than the last full backup. Therefore, in a normal production environment, circular logging isn&amp;#8217;t recommended.&lt;/p&gt;

&lt;p&gt;In the standard transaction logging used by Exchange 2010, each database transaction is written to a log file and then to the database. When a log file reaches one megabyte in size, it&amp;#8217;s renamed and a new log file is created. Over time, this results in a set of log files. If Exchange stops unexpectedly, you can recover the transactions by replaying the data from these log files into the database. Circular logging overwrites and reuses the first log file after the data it contains has been written to the database. &lt;/p&gt;


&lt;p&gt;Use the EMC to configure mailbox database properties &lt;br /&gt;
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the &amp;#8220;Mailbox database&amp;#8221; entry in the Mailbox Permissions topic.&lt;/p&gt;

&lt;p&gt;1.In the console tree, navigate to Organization Configuration &gt; Mailbox.&lt;/p&gt;

&lt;p&gt;2.In the result pane, on the Database Management tab, select the database you want to configure.&lt;/p&gt;

&lt;p&gt;3.In the work pane, click Properties.&lt;/p&gt;

&lt;p&gt;4.Use the Maintenance tab to configure mailbox database settings, including specifying a journal recipient, setting a maintenance schedule, and mounting the database at startup:&lt;/p&gt;

&lt;p&gt;    Journal recipient   Select this check box to enable transport journaling of e-mail.&lt;/p&gt;

&lt;p&gt;    Maintenance schedule   Use this list to select one of the preset maintenance schedules. You can also configure a custom schedule. To configure a custom schedule, in the Maintenance schedule list, select Use Custom Schedule, and then click Customize.&lt;/p&gt;

&lt;p&gt;    Don&amp;#8217;t mount this database at startup   Select this check box to prevent Exchange from mounting this mailbox database when it starts.&lt;/p&gt;

&lt;p&gt;    This database can be overwritten by a restore    Select this check box to allow the mailbox database to be overwritten during a restore process.&lt;/p&gt;

&lt;p&gt;    Enable circular logging   Select this check box to enable circular logging. For more information about circular logging see Understanding the Exchange 2010 Store.&lt;/p&gt;


&lt;p&gt;You then need to dismount and remount the database. You can just right click to get to this menu.&lt;/p&gt;


&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.mattsampson.net/index.php/2010/06/20/circular_logging_exchange_2010?blog=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
	<content:encoded><![CDATA[<p>Although it is not recommend it as a best practice, you can configure Exchange to save disk space by enabling circular logging. Circular logging allows Exchange to overwrite transaction log files after the data that the log files contain has been committed to the database. </p>

<p>In Exchange 2010, circular logging is disabled by default. By enabling it, you reduce drive storage space requirements. However, without a complete set of transaction log files, you can&#8217;t recover any data more recent than the last full backup. Therefore, in a normal production environment, circular logging isn&#8217;t recommended.</p>

<p>In the standard transaction logging used by Exchange 2010, each database transaction is written to a log file and then to the database. When a log file reaches one megabyte in size, it&#8217;s renamed and a new log file is created. Over time, this results in a set of log files. If Exchange stops unexpectedly, you can recover the transactions by replaying the data from these log files into the database. Circular logging overwrites and reuses the first log file after the data it contains has been written to the database. </p>


<p>Use the EMC to configure mailbox database properties <br />
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the &#8220;Mailbox database&#8221; entry in the Mailbox Permissions topic.</p>

<p>1.In the console tree, navigate to Organization Configuration > Mailbox.</p>

<p>2.In the result pane, on the Database Management tab, select the database you want to configure.</p>

<p>3.In the work pane, click Properties.</p>

<p>4.Use the Maintenance tab to configure mailbox database settings, including specifying a journal recipient, setting a maintenance schedule, and mounting the database at startup:</p>

<p>    Journal recipient   Select this check box to enable transport journaling of e-mail.</p>

<p>    Maintenance schedule   Use this list to select one of the preset maintenance schedules. You can also configure a custom schedule. To configure a custom schedule, in the Maintenance schedule list, select Use Custom Schedule, and then click Customize.</p>

<p>    Don&#8217;t mount this database at startup   Select this check box to prevent Exchange from mounting this mailbox database when it starts.</p>

<p>    This database can be overwritten by a restore    Select this check box to allow the mailbox database to be overwritten during a restore process.</p>

<p>    Enable circular logging   Select this check box to enable circular logging. For more information about circular logging see Understanding the Exchange 2010 Store.</p>


<p>You then need to dismount and remount the database. You can just right click to get to this menu.</p>


<div class="item_footer"><p><small><a href="http://blog.mattsampson.net/index.php/2010/06/20/circular_logging_exchange_2010?blog=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
			</item>

<item rdf:about="http://blog.mattsampson.net/index.php/2010/06/07/how_to_send_email_using_telnet?blog=1">
	<title>How to Send Email Using Telnet</title>
	<link>http://blog.mattsampson.net/index.php/2010/06/07/how_to_send_email_using_telnet?blog=1</link>
	<dc:date>2010-06-07T14:49:56Z</dc:date>	<dc:creator>admin</dc:creator>
	<dc:subject>Tech Stuff</dc:subject>
		<description>&lt;p&gt;Sending emails with Telnet can be very easy to do if you know how to do it. &lt;br /&gt;
Please continue reading for some instructions for sending mail with Telnet.&lt;/p&gt;

&lt;p&gt;1. Open the cmd prompt. (Start -&gt; Run or press win key + R, then type cmd and press OK)&lt;/p&gt;

&lt;p&gt;2. Type telnet server.com 25 (where &amp;#8220;server.com&amp;#8221; is the name of the smtp (outgoing) server of your email provider, such as smtp-server.austin.rr.com). This can be found by checking your account info in the program you normally use for email.&lt;/p&gt;

&lt;p&gt;3. Type HELO mail-01. (Or &amp;#8220;EHLO server.com&quot;)&lt;br /&gt;
4. Type MAIL FROM:you@server.com.&lt;br /&gt;
5. You may get a message saying &amp;#8220;250 ok&amp;#8221;&lt;br /&gt;
6. Type RCPT TO:joe@me.com, &lt;a href=&quot;mailto:matt@bobsmith.org&quot;&gt;matt@bobsmith.org&lt;/a&gt;, &lt;br /&gt;
7. again, You may get a message saying &amp;#8220;250 ok&amp;#8221;&lt;br /&gt;
8. To write the message, type DATA and press Enter.  &lt;br /&gt;
  a. On the first line type SUBJECT:your subject and press Enter twice.&lt;br /&gt;
  b. Continue typing your message.&lt;br /&gt;
  c. Put a single period (.) on a line by itself and press Enter to send your message. &lt;br /&gt;
     The server should say &amp;#8216;Message accepted for delivery&amp;#8217;. (Or it says 250 OK id=`a long id`)&lt;br /&gt;
9. Type QUIT to exit Telnet.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.mattsampson.net/index.php/2010/06/07/how_to_send_email_using_telnet?blog=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
	<content:encoded><![CDATA[<p>Sending emails with Telnet can be very easy to do if you know how to do it. <br />
Please continue reading for some instructions for sending mail with Telnet.</p>

<p>1. Open the cmd prompt. (Start -> Run or press win key + R, then type cmd and press OK)</p>

<p>2. Type telnet server.com 25 (where &#8220;server.com&#8221; is the name of the smtp (outgoing) server of your email provider, such as smtp-server.austin.rr.com). This can be found by checking your account info in the program you normally use for email.</p>

<p>3. Type HELO mail-01. (Or &#8220;EHLO server.com")<br />
4. Type MAIL FROM:you@server.com.<br />
5. You may get a message saying &#8220;250 ok&#8221;<br />
6. Type RCPT TO:joe@me.com, <a href="http://blog.mattsampson.netmailto:matt@bobsmith.org">matt@bobsmith.org</a>, <br />
7. again, You may get a message saying &#8220;250 ok&#8221;<br />
8. To write the message, type DATA and press Enter.  <br />
  a. On the first line type SUBJECT:your subject and press Enter twice.<br />
  b. Continue typing your message.<br />
  c. Put a single period (.) on a line by itself and press Enter to send your message. <br />
     The server should say &#8216;Message accepted for delivery&#8217;. (Or it says 250 OK id=`a long id`)<br />
9. Type QUIT to exit Telnet.</p><div class="item_footer"><p><small><a href="http://blog.mattsampson.net/index.php/2010/06/07/how_to_send_email_using_telnet?blog=1">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
			</item>
</rdf:RDF>
