Blog / Sysadmin

How to query Active Directory using SQL Server

August 25, 2008

Here is one of those things that I wish I had known much sooner. Very useful and a big time saver. I just found out about this a few months ago when I wanted to run a report against AD to see if the account info are consistent and up to date, to see which accounts have passwords set to never expire, when they were created/last updated, etc.

So I asked myself whether it’s possible …

Microsoft Tech Ed 2008 IT Pros

July 25, 2008

Happy System Administrator Appreciation Day!

I know this post is a bit late.

Anyway, we attended the Tech Ed 2008 IT Professionals in Orlando, Florida last month (June 10-13) and it was a lot of fun! Lots to do and learn. There were a lot of people who attended (close to 9,500 according to Microsoft).

This is my first Tech Ed and I’m really glad I was able to go to this one. There were …

Apache: Redirecting http to https using a .htaccess file

March 23, 2008

To redirect http traffic to https in Apache, create a .htaccess file with the following content:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Place the .htaccess file in your website directory and that should be it.

NOTE: The rewrite module in Apache must be enabled for this to work. To check whether it is enabled, open your httpd.conf and make sure the line below is not commented:

LoadModule rewrite_module modules/mod_rewrite.so

If you’re running Apache …

Exchange 2007 SP1: Message rejected as spam by Content Filtering

March 11, 2008

Error Message:

550 5.7.1 Message rejected as spam by Content Filtering.

One of our users reported that after we applied Service Pack 1 and Update Rollup 1 to Exchange Server 2007, some of the emails that he has scheduled to send daily were getting rejected with the message above.

I guess the integrated anti-spam in Exchange got updated as well.

You can configure Content Filtering in Exchange to bypass specific users or domains.

Open the …

Exchange Management Tools SP1: Service Remote Registry failed to reach status “Stopped”

March 10, 2008

Error Message:

Service Remote Registry failed to reach status “Stopped”

I got this error while upgrading the Exchange Management Tools on my Windows XP computer at work to Service Pack 1. I checked the services and the Remote Registry service is stuck at “Stopping” status.

To fix this, simply set the Remote Registry service’s startup type to Manual, reboot your computer, try installing Exchange Server 2007 SP1 Management Tools again and it should now …