BAM is an essential tool that is been used for tracking in BizTalk/WF/WCF. Below are the list of bam commands, which will be useful for BizTalk-BAM Developers.

Follow the below two steps to execute the commands.


  1. Open Command Prompt with Administrative Privileges
  2. Navigate to the Biztalk installation folder and get into tracking folder (Eg: C:\Program Files (x86)\Microsoft BizTalk Server 2010\Tracking)

BAM Commands

You can execute the BAM commands on a different server from your machine by using the second command in all the below list:

Definition File

Deploy BAM Activity with Definition File

bm.exe deploy-all -DefinitionFile:MyDef.xml

bm.exe deploy-all -DefinitionFile:MyWorkbook.xls -Server:machine1

Undeploy BAM Activity with Definition File

bm.exe remove-all -DefinitionFile:MyDef.xml

bm.exe remove-all -DefinitionFile:MyWorkbook.xls -Server:machine1

To Update BAM Definition File

bm.exe update-all -DefinitionFile:MyDef.xml

bm.exe update-all -DefinitionFile:MyWorkbook.xls -Server:machine1

To Get all BAM Definition from BAM Database

bm.exe get-defxml -FileName:BAMDefinition.xml

bm.exe get-defxml -FileName:MyDef.xml -Server:MyServer -Database:MyPI


To Remove BAM Activity without Definition File

bm.exe remove-activity -Name:PurchaseOrder

bm.exe remove-activity -Name:PO -Server:MyServer -Database:MyPrimaryImport

To get all activities in BAM

bm.exe get-activities -View:SalesManagerView

bm.exe get-activities -Server:MyServer -Database:MyPrimaryImport


To Remove BAM View without DefinitionFile

bm.exe remove-view -Name:POView

bm.exe remove-view -Name:MyView -Server:MyServer -Database:MyPrimaryImport

To get all views in BAM

bm.exe get-views -Activity:PO1

bm.exe get-views -Server:MyServer -Database:MyPrimaryImport

View Accounts

To add accounts for accessing BAM views

bm.exe add-account -AccountName:john -View:PurchaseOrder

bm.exe add-account -AccountName:Agents -View:PO -Server:Srv1 -Database:Db2

To get all accounts which has been given access to particular view

bm.exe get-accounts -View:PurchaseOrder

bm.exe get-accounts -View:ShipmentOrder -Server:Ship -Database:ShipDatabase


To Remove BAM Alerts

bm.exe remove-alerts -View:SalesManagerView

bm.exe remove-alerts -View:Shipments -Server:Ship1

To get all alerts configured in BAM

bm.exe get-alerts -View:ManagerView

bm.exe get-alerts -Server:MyServer -Database:MyPrimaryImport

To enable an BAM alert

bm.exe enable-alerts -View:SalesManagerView

bm.exe enable-alerts -View:SalesManagerView -Server:s1 -Database:db2

To Disable a BAM Alerts

bm.exe disable-alerts -View:SalesManagerView

bm.exe disable-alerts -View:SalesManagerView -Server:s1 -Database:db2

To get list of subscriptions for the Alerts in BAM

bm.exe get-subscriptions -View:SalesManagerView -Alert:SalesTooLow

bm.exe get-subscriptions -View:Shipments -Alert:SlowShipment -Server:Ship1

To add a Subscription for an alerts

bm.exe add-subscription -View:v1 -Alert:a2 -AccountName:domain\user -Type:File

bm.exe add-subscription -View:v1 -Alert:a2 -AccountName:domain\user -Type:Email

To Remove-Subscription

bm.exe remove-subscription -View:v1 -Alert:a2 -AccountName:domain\user

bm.exe remove-subscription -View:v1 -Alert:a2 -AccountName:user -Server:s1

BAM Configuration

To get the BAM Configuration details

bm.exe get-config -FileName:MyConfig.xml

bm.exe get-config -FileName:BAMConfiguration.xml -Server:OrdersServer

To update the BAM Configuration details

bm.exe update-config -FileName:MyConfig.xml