Thursday, February 24, 2011

Outlook signature based on user information from Active Directory

1) Download the script from here. Save it to a UNC-path accessible for all users.
2) Adjust the custom variables:

3) From an Outlook client, create a signature based on your company template:

4) Copy the signature files from %appdata%\Microsoft\Signatures to the UNC-path specified in the SigSource-variable in the script:

5) Open both Company Name.rtf and Company Name.htm in Microsoft Office Word and insert the following bookmarks:

Mark each word, e.g. “EmailAddress”, go to “Insert”, press the “Bookmark”-button and name the bookmark “EmailAddress”. It`s important that the names of the bookmarks are “DisplayName”, “Title”, “TelephoneNumber” and “EmailAddress”.
This is because these bookmarks are replaced by the information retrieved from Active Directory for the logged-on user.
6) When appropriately tested, deploy the script to end users. This may be accomplished by e.g. Group Policy:

Additional information
Sample signature created using Set-OutlookSignature.ps1:

Active Directory object for sample user:

Settings are stored in HKCU in the registry:

A few notes:
-Existing signatures are preserved
-Users are allowed to make customizations to their signatures until a new version is deployed. Then the exisiting company-signature will be overwritten.

No comments:

Post a Comment