PowerShell Script Execution
  • 01 Nov 2022
  • 2 Minutes to read
  • Dark
    Light
  • PDF

PowerShell Script Execution

  • Dark
    Light
  • PDF

PowerShell scripts can be used to automate many of BizTalk Server administrator tasks and also the scripts are used to manage the BizTalk Environment for various reasons.

Let us consider a scenario where the BizTalk server solution is deployed to a different environment and for some reason, you can't use CI/CD . Then the PowerShell script can be used to change the URI of all the ports from the binding files and also with the script you can update the authentication credentials of each port. This execution can be scheduled by using BizTalk360 PowerShell Automated Task.

Any PowerShell script created in the local or remote server can be mapped for execution. BizTalk360 PowerShell Task will validate and execute the mapped script during the scheduled time. 

PowerShell task Configuration  

  • To configure PowerShell Tasks navigate to Environment Settings->Automated Tasks ->New Task Configuration->Select PowerShell Script, which will open the task configuration blade  
  • Add the Task Name and Description 
  • Server   Enter the server name(Local/Remote) where the PowerShell Script needs to be executed. The user must have access to the server for script execution 


What happens if the server is not reachable?
The task can be still saved even when the server is not reachable but the script execution will get failed.
  • Friendly Name-Provide a friendly name for your identification  
  • Script - Update the script that needs to be executed
  • Variable - Add the values for the variable that is mentioned in the script. Add a variable in the same order as updated in the script. If a variable is dependent on another variable make sure that is updated first
  • Validate Script this option helps to validate the script syntax and throws an error 
  • Enable/Disable the task for execution. By default, the task execution will be enabled. If it's disabled then this task will not be executed at any time.
  • Run this task immediately after saving - Enable this option to run the task immediately after saving the task configuration. However, the same task will execute again during the scheduled time.
  • Follow this article for Schedule Configuration 
  • Notification Configuration - Enable the channels in which you wish to get notified about the script execution

On successful task configuration, you can see the task in the configuration grid along with the task name, resource type, resource details, Action, Schedule type, and Next execution time.


Points to Remember:

  • Monitoring service should run under the administrator account 
  • The user must have access to the server in which the PowerShell Script gets executed
  • The connection to the remote server is made via Telnet or Ping(ICMP) . Make sure the BizTalk360  running servers should be enabled with the ports Telnet - TCP/23, Ping ICMP/Protocol-1 in the Windows Firewall to communicate with the other server

Was this article helpful?

What's Next