How to find out which servers hold the FSMO roles in your forest/domain

Just a quick tip on finding which servers hold the Flexible Single Master Operations(FSMO) roles.
Enter the following at the command prompt from any Domain Controller:

for %x in (schema name infr pdc rid) do dsquery server -forest -hasfsmo %x

An explanation of the roles and how to transfer them can be found here: http://support.microsoft.com/kb/324801

Edit: An even quicker way is to type:

netdom query fsmo