Mass Remove TFS E-Mail Notifications
Saturday, December 29, 2007 at 02:22PM Recently, I had the need to remove in bulk a bunch of e-mail notifications that had been setup. Initially you can add notifications using either Team Explorer or using the bissubscribe.exe tool on the TFS server where you pretty much just specify the same info.
bissubscribe can also be used to remove subscriptions as well. In order to remove them that way you need to know the ID of the subscription. You can find out the ID by querying the tbl_subscription table in the TfsIntegration database. You don't want to just remove rows there best to go through the tool.
You can however easily use the query on that table to generate all the bissubscribe commands for you and then just drop them into a script file to run!
Here's a simple SQL query to remove all notifications for a user
select 'bissubscribe /unsubscribe /server tfsservernamehere /id ' + convert(varchar(20),id)
from tbl_subscription where address = 'someuser@somedomain.com'
The output ends up looking like a bunch of the following lines
bissubscribe /unsubscribe /server tfsservernamehere /id 2324
bissubscribe /unsubscribe /server tfsservernamehere /id 2329
Reader Comments