BizTalk – Reporting How Many Files Processed By App/Date

Often, after implementing a new system or application on BizTalk, we need to provide a report to management of how many files were processed. If you keep an archive of all files in or out, you can use that with a simple PowerShell to accomplish the report. Here’s an example I found: PowerShell Example 1 […]

Powershell RegEx – to find all matches in a file

cls $filename = "c:\Users\Neal\OneDrive\Documents\myFile.html" #example of what I'm trying to pick out <strong>mydomainname.com</strong> $regexPattern = "<strong>(.*?)</strong></a>" gc $filename | Select-String -Pattern $regexPattern -AllMatches | ForEach-Object {$_.matches.groups[1].value} Note that the Matches returns two groups with subscripts 0 and 1. The subscript 0 contains the tags “strong” around the match. the subscript 1 contains just the captured […]

C# Program to Monitor BizTalk

If you are interesting in using C# to Monitor Biztalk, instead of Powershell to Monitor BizTalk, or Powershell to Monitor Diskspace, or Powershell to Monitor EventLogs (and send out emails) then check out this blog and sample code: https://prashantbiztalkblogs.wordpress.com/2017/08/30/monitoring-biztalk-resources-programmatically-using-c/ I didn’t run it, but it looks like a good sample to get started with.  

Powershell to Rename Files to Add Date To Filename

With the SFTP ports in BizTalk 2013, we are using the log function. BizTalk appends each SFTP log to the end of the existing log file. So I created a Powershell Script to take an array of directory names, and run the same re-run and delete logic for each. I also include the logic to […]