Powershell Data Factory in exMon

Created by: Kristinn Magnusson

In this article, you will read about the PowerShell data factory in exMon.

  1. Download the Powershell script and DLL required to run Data Factory in exMon, here
  2. Place these two files into a folder on the machine that should run the Data Factory. In my example, I will use the directory C:\Modules
  3. In the Azure Portal, we need to create an App registration which we will use to access our Data Factory:
    1. Azure Portal
    2. Azure Active Directory
    3. App Registration

       
  4. There we select the New registration button



  5. When we have created our registration we get a window with some key information. Make a note of these values as they will be used in exMon to authenticate our execution.

     

  6. Now we want to create a client secret to use so we select Certificates and Secrets in the menu on the left and select the New client secret button

     

    We create our secret and get a value that exMon will use:

    Make sure to copy this value

  7. Now you need to go open your data factory under Data factories.
    Note down your subscription id and resource group:
     
    Then move to Access Control(IAM) –> Role Assignments and select the add button. Make your new App registration a Contributor to your Data factory 

  8. Lastly, you need to find your Data Factory name and pipeline name.
    These should be easily found under your Data Factory under https://adf.azure.com/:

     

  9. Now we should have all the information we need to create a package in exMon.
  10. Open exMon Administrator and create a new Command Line package in exMon
    The Command line should look like this:

    powershell C:\Modules\DataFactory.ps1 -tenantId "XXXXX" -appId "XXXXX" -clientSecrets "XXXX" -subscriptionId "XXXX" -resourceGroupName "XXX" -factoryName "XXX" -apiVersion "2018-06-01" -pipelineName "XXX"

    Add your own parameters to this command line from the information we created above.

Kristinn is the author of this solution article.