Active Directory

Using dsquery or dsget for Users’ Terminal Server Profile Path

Sorry but it won’t work. I can’t imagine why Microsoft would have dsquery and dsget operate on only a partial set of the user’s properties and leave out others but they did provide TSPROF to bridge this particular gap.

tsprof

TSPROF /UPDATE [/DOMAIN:domainname|/LOCAL] /PROFILE: username
TSPROF /COPY [/DOMAIN:domainname|/LOCAL] [/PROFILE: ] src_usr dest_usr
TSPROF /Q [/DOMAIN:domainname|/LOCAL] username

Active Directory
Windows
Citrix

Comments (0)

Permalink

Listing the Home Directory Values for Domain Users

A simple dsquery command piped to dsget will show us the home directory for all users in an Active Directory domain.

dsquery user -limit 1000 | dsget user -hmdir

To change the home directory setting, use a variation on the same command.

dsquery user -limit 1000 | dsmod user -hmdir \\server\share\$username$

The $username$ variable will be populated with the value of the current user’s account name.

Active Directory

Comments (0)

Permalink

Finding All E-mail Addresses in Exchange

This DSQUERY lists all e-mail addresses in Exchange, and Active Directory including Public Folders, Contacts and User mailboxes.

dsquery * forestroot -scope subtree -filter “(&(mail=*)(proxyaddresses=smtp:*))” -attr proxyaddresses - limit 10000

The output is a bit messy but nothing a little bit on time in vim can’t fix. Bharat Suneja has a very elegant script that does the same thing but it doesn’t include the SMTP addresses of public folders.

Exchange Server
Active Directory

Comments (0)

Permalink

All Global Catalog Servers in Use Are Not Responding on Exchange Server 2003

The fix for this error condition is relatively simple. If your Exchange server has network interfaces on more than one network (perhaps a SAN or a dedicated backup network), it may be attempting to locate global catalog servers using the wrong network.

Event Source: MSExchangeDSAccess
Event Category: Topology
Event ID: 2103
Description: Process MAD.EXE. All Global Catalog Servers in use are not responding:

Go to Control Panel > Network Connections > Advanced > Connections and move the network interface that has access to your global catalog servers to the top of the list. No reboot or service restart is necessary. The Exchange server “checks in” with a global catalog server every 15 minutes so watch it for a while to get the warm fuzzy feeling of having saved the day yet again.

Exchange Server
Active Directory

Comments (2)

Permalink

Finding an Active Directory User Account Using the SMTP Address

There may be a time when you have the SMTP address of a user but you need to find the Active Directory user account associated with it. I found myself in need of this information while tracking a deliverability issue using the Exchange Server 2003 SMTP logs. To do this you will need to search the proxy address values for all users.

According to Hey, Scripting Guy, a proxy address is “simply an alias by which an Exchange user can be recognized by a non-Exchange mail system.”

  1. Open Active Directory Users and Computers
  2. Right-click the domain and select Find
  3. Go to the Advanced tab
  4. Select Custom Search from the Find drop-down list and go to the Advanced tab.
  5. In the Enter LDAP query text box, type the following:
  6. proxyaddresses=SMTP:user@example.com

  7. Click on Find Now

And it will list the Active Directory account with that SMTP address attached to it.

Exchange Server
Active Directory

Comments (0)

Permalink