TmgAdConfig (aka ADConfig, ADConfigPack)

To avoid you tearing your hair out trying to find it:

The tool TMGADCONFIG.exe is included in the ADCONFIGPACK.exe download, available from this location, which extracts to the Program Files(x86)\Forefront TMG Tools\ADCONFIG folder by default.

I was chasing it down with great vengeance and furious anger cos the examples on the web indicated that the AD Marker was stored in the Configuration partition (i.e. at the root of a given domain - one setting for the domain (cue indignant "well what about site awareness!?" on my part)).

The AD Marker, incidentally, is a new method through which the Firewall Client (TMG Client) tries to detect available TMG Servers - it's intended to be more secure than the existing WPAD.DAT/WSPAD.DAT mechanisms (though they should still work unless you turn them off).

Happily, the –? story differs from the other published works (and included .doc file), and implies much site-aware joy, so I thought I’d republish the detailed help for all of it here, for your viewing pleasure.

TmgAdConfig -?

Forefront TMG Auto-Discovery Configuration Tool
Usage:
TmgAdConfig.exe add -site <site-name> -type winsock -url <service-url> [-f]
TmgAdConfig.exe add -default -type winsock -url <service-url> [-f]

    TmgAdConfig.exe del -site <site-name> -type winsock
TmgAdConfig.exe del -default -type winsock

    TmgAdConfig.exe list [-default] [-site [<site-name>]]

    TmgAdConfig.exe <any-command> -help

Example:
TmgAdConfig.exe add -site My-Site -type winsock -url https://contoso.com:8080/wspad.dat
    Register the given URL as the winsock proxy service for site My-Site.
TmgAdConfig.exe list -site My-Site
Print all service markers registered for site My-Site.

 

TmgAdConfig add -help

Forefront TMG Auto-Discovery Configuration Tool
Description:
Add (register) a new marker in Active Directory.

Usage:
TmgAdConfig.exe add -site <site-name> -type winsock -url <service-url> [-f]
TmgAdConfig.exe add -default -type winsock -url <service-url> [-f]

Parameters:
-site Active Directory site associated with the new marker.
-default Makes the new marker the default for all sites.
-type Service type of the marker.
-url URL from which to retrieve the service configuration file.
-f Force overwrite if the marker already exists.

Example:
TmgAdConfig.exe add -site My-Site -type winsock -url https://contoso.com:8080/wspad.dat
    Register the given URL as the winsock proxy service for site My-Site.

 

TmgAdConfig del -help

Forefront TMG Auto-Discovery Configuration Tool
Description:
Remove (unregister) a marker previously registered in Active Directory.

Usage:
TmgAdConfig.exe del -site <site-name> -type winsock
TmgAdConfig.exe del -default -type winsock

Parameters:
-site Active Directory site from which to remove the marker.
-default Remove the site-default marker.
-type Service type of the marker to remove.

Example:
TmgAdConfig.exe del -site My-Site -type winsock
Unregister the current winsock proxy service registered for site My-Site.

 

TmgAdConfig list -help

Forefront TMG Auto-Discovery Configuration Tool
Description:
List registered markers.

Usage:
TmgAdConfig.exe list [-site [<site-name>]] [-default]

Parameters:
-site List site markers (use without a value to list all sites).
-default List the default markers.

Examples:
TmgAdConfig.exe list
Print all registered service markers.
TmgAdConfig.exe list -default
Print all default service markers.

 Enjoy!