Archive for May, 2009

Diskpart.exe Warning when expanding drive

Recently when using diskpart.exe to expand a volume on a Windows Server 2000 SP4 machine, we got a warning "Deleting the primary partition has modified the partition number of the partition that contains your Windows 2000 system files.  The old partition number was 2; the new partition number is 1."

We changed the boot.ini file from:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows 2000 Server" /fastdetect

to:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Server" /fastdetect

On rebooting the server, the server refused to boot throwing an NT Kernel not found error.

How to fix it:

Read the rest of this entry »

, ,

1 Comment

Get list of machines by OS type from Active Directory

Here is an easy way of getting a list of computers that have a particular OS type from Active Directory using DSQuery.

dsquery * domainroot -filter “(&(objectCategory=computer)(operatingSystem=Windows XP*))”

The command above would give you a list of all computers that have a Windows XP operating system. For Windows Servers, change the command as follows:

dsquery * domainroot -filter “(&(objectCategory=computer)(operatingSystem=Windows Server*))”

The output of the commands above would look something like this:

samid

server1$

server2$

server3$

dsget succeeded

Note the ‘samid’ at the head and ‘dsget succeeded’ at the end and the ‘$’ at the end tail of every server name.

If you are like me, and you would like just get a nice clean output with only server names, you can run this command:

Read the rest of this entry »

, ,

No Comments

Active Directory Audit Script

Paul Bergson wrote this brilliant script that queries active directory and gives you a wealth of information that can be used to audit active directory.

I have slightly modified this script and added a few lines to get information like the email address and the exchange home server of the user using the mail and msExchHomeServerName attributes.

You can download the modified script here.

How the script works:

Read the rest of this entry »

, , ,

1 Comment

Error: RewriteEngine not allowed here

I started seeing this error on my website after enabling “pretty” Permalinks in WordPress and as a direct result of it, I got html Error 500 (Internal Server Error). If you get this error, it can be fixed by doing the following:

Read the rest of this entry »

, , ,

No Comments