by Abhishek kumar Pathak | May 3, 2016 | BizTalk Community Blogs via Syndication
Recently there was a chance to implement the Power Shell script which re-start the BizTalk host instances.
————————————————————-
[ARRAY]$hostInstances = get-wmiobject MSBTS_HostInstance -namespace ‘rootMicrosoftBizTalkServer’ -Filter ‘(HostType = 1)’
write-host (‘Total Number of Host Instance : ‘+$hostInstances.Count) -Fore Yellow
Write-Host “Re-starting Host instance” -Fore Yellow
foreach ($hostInstance in $hostInstances)
{
$hostInstance.Stop()
$hostInstance.Start()
}
Write-Host “Host instances are restarted successfully” -Fore Yellow
———————————————————-
by Abhishek kumar Pathak | Apr 29, 2016 | BizTalk Community Blogs via Syndication
Recently there was a chance to implement the Power Shell script which will monitor the BizTalk application . It is very simple script which get executed by windows task scheduler at predefined time period. It will start all artifacts of BizTalk which will in stop/disable/unlisted state. If the artifacts are up and running, it will not do anything.
#BizTalk Application Monitoring
$Date = Get-Date
$Logfile = "C:ScriptLogs$(gc env:computername)_$(get-date -f yyyy-MM-dd).log"
Function LogWrite
{
Param ([string]$logstring)
Add-content $Logfile -value $logstring
}
$test = '----------------------------------------------------------'
LogWrite $test
$test = 'Script Started-BizTalk Monitor at '+$Date.DateTime
LogWrite $test
# Get local BizTalk DBName and DB Server from WMI
$btsSettings = get-wmiobject MSBTS_GroupSetting -namespace 'rootMicrosoftBizTalkServer'
$dbInstance = $btsSettings.MgmtDbServerName
$dbName = $btsSettings.MgmtDbName
# Load BizTalk ExplorerOM
[void] [System.reflection.Assembly]::LoadWithPartialName("Microsoft.BizTalk.ExplorerOM")
$BizTalkOM = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$BizTalkOM.ConnectionString = "SERVER=$dbInstance;DATABASE=$dbName;Integrated Security=SSPI"
[ARRAY]$apps=$BizTalkOM.Applications
Foreach ($app in $apps)
{
if ($app.Name -like 'BizTalkAppName*')
{
$app.Start(63)
$BizTalkOM.SaveChanges()
$test = $app.Name+ " Started"
LogWrite $test
}
}
$test = 'Script executed sucessfully at '+$Date.DateTime
LogWrite $test
$test = '----------------------------------------------------------'
LogWrite $test
by Abhishek kumar Pathak | Apr 29, 2016 | BizTalk Community Blogs via Syndication
Recently there was a chance to implement the Power Shell script which will monitor the BizTalk application . It is very simple script which get executed by windows task scheduler at predefined time period. It will start all artifacts of BizTalk which will in stop/disable/unlisted state. If the artifacts are up and running, it will not do anything.
#BizTalk Application Monitoring
$Date = Get-Date
$Logfile = "C:ScriptLogs$(gc env:computername)_$(get-date -f yyyy-MM-dd).log"
Function LogWrite
{
Param ([string]$logstring)
Add-content $Logfile -value $logstring
}
$test = '----------------------------------------------------------'
LogWrite $test
$test = 'Script Started-BizTalk Monitor at '+$Date.DateTime
LogWrite $test
# Get local BizTalk DBName and DB Server from WMI
$btsSettings = get-wmiobject MSBTS_GroupSetting -namespace 'rootMicrosoftBizTalkServer'
$dbInstance = $btsSettings.MgmtDbServerName
$dbName = $btsSettings.MgmtDbName
# Load BizTalk ExplorerOM
[void] [System.reflection.Assembly]::LoadWithPartialName("Microsoft.BizTalk.ExplorerOM")
$BizTalkOM = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$BizTalkOM.ConnectionString = "SERVER=$dbInstance;DATABASE=$dbName;Integrated Security=SSPI"
[ARRAY]$apps=$BizTalkOM.Applications
Foreach ($app in $apps)
{
if ($app.Name -like 'BizTalkAppName*')
{
$app.Start(63)
$BizTalkOM.SaveChanges()
$test = $app.Name+ " Started"
LogWrite $test
}
}
$test = 'Script executed sucessfully at '+$Date.DateTime
LogWrite $test
$test = '----------------------------------------------------------'
LogWrite $test
by Abhishek kumar Pathak | Mar 21, 2016 | BizTalk Community Blogs via Syndication
Recently I got a chance to install and configure the ESB Tool Kit and ESB Management portal in multi-server environment.
Below are the steps which I followed to successfully configure and deploy the ESB Management portal.
- Install Enterprise Library 5 from http://www.microsoft.com/en-in/download/details.aspx?id=15104
- Install Chart Control from Microsoft Chart Controls for .Net Framework 4 & Framework 3.5
- Install Microsoft Report Viewer Redistributable 2008 from http://www.microsoft.com/en-in/download/confirmation.aspx?id=6576
- Copy the ESB portal source code from the development server in C:Projects folder and Remove the read-only attribute of this folder.
- Update database server name in the web config file of ESB portal (located in “C:ProjectsMicrosoft.Practices.ESBESBSourceSourceSamplesManagement PortalESB.PortalWeb.Config” )
- Update Database server name in web config of ESB Exception Service (Located in “C:ProjectsMicrosoft.Practices.ESBESBSourceSourceSamplesManagement PortalESB.Exceptions.ServiceESB.Exceptions.ServiceWeb.config”)
- To turn on unrestricted access for Power Shell, execute the following command using the Power Shell 32-bit and 64-bit consoles:
- set-executionpolicy unrestricted
- To verify, run the following command
- get-executionpolicy
- Note: If you face any issue with above script, use “Set-ExecutionPolicy Unrestricted -Scope CurrentUser”
- Go to the C:ProjectsMicrosoft.Practices.ESBESBSourceSourceSamplesManagement PortalInstallScripts location and edit Management_Install.ps1 script.
- Comment the [BuildManagementSolution] function of Power Shell script. (This is required because there is no need to build the solution again).
- Update the [RunDatabaseScript $relativePath”SQLESB.Administration Database.sql” “Database server Name“] command. (This is required because It will try to create the database in local server)
- Step 10 is only required for first server configuration. Later comment this line of script for other server (This is because SQL Server will be same for Both BizTalk instance)
- Open a command prompt using “Run as administrator”.
- Execute the Management_Install.cmd command located in “C:ProjectsMicrosoft.Practices.ESBSourceSamplesManagementPortalInstallScripts”.
- Open the IIS manager, Select the ESB portal and check the authorization. If all fine, Browse the ESB portal directly from here.
- If some error occurred, Change the authorization and app pool setting by checking user access.
Repeat the same step to other server.
Note: Multi-Server Environment – (Two BizTalk Server and one SQL server)
Please let me know If any suggestion on this or Feel free to add some point.
by Abhishek kumar Pathak | Mar 21, 2016 | BizTalk Community Blogs via Syndication
Recently I got a chance to install and configure the ESB Tool Kit and ESB Management portal in multi-server environment.
Below are the steps which I followed to successfully configure and deploy the ESB Management portal.
- Install Enterprise Library 5 from http://www.microsoft.com/en-in/download/details.aspx?id=15104
- Install Chart Control from Microsoft Chart Controls for .Net Framework 4 & Framework 3.5
- Install Microsoft Report Viewer Redistributable 2008 from http://www.microsoft.com/en-in/download/confirmation.aspx?id=6576
- Copy the ESB portal source code from the development server in C:Projects folder and Remove the read-only attribute of this folder.
- Update database server name in the web config file of ESB portal (located in “C:ProjectsMicrosoft.Practices.ESBESBSourceSourceSamplesManagement PortalESB.PortalWeb.Config” )
- Update Database server name in web config of ESB Exception Service (Located in “C:ProjectsMicrosoft.Practices.ESBESBSourceSourceSamplesManagement PortalESB.Exceptions.ServiceESB.Exceptions.ServiceWeb.config”)
- To turn on unrestricted access for Power Shell, execute the following command using the Power Shell 32-bit and 64-bit consoles:
- set-executionpolicy unrestricted
- To verify, run the following command
- get-executionpolicy
- Note: If you face any issue with above script, use “Set-ExecutionPolicy Unrestricted -Scope CurrentUser”
- Go to the C:ProjectsMicrosoft.Practices.ESBESBSourceSourceSamplesManagement PortalInstallScripts location and edit Management_Install.ps1 script.
- Comment the [BuildManagementSolution] function of Power Shell script. (This is required because there is no need to build the solution again).
- Update the [RunDatabaseScript $relativePath”SQLESB.Administration Database.sql” “Database server Name“] command. (This is required because It will try to create the database in local server)
- Step 10 is only required for first server configuration. Later comment this line of script for other server (This is because SQL Server will be same for Both BizTalk instance)
- Open a command prompt using “Run as administrator”.
- Execute the Management_Install.cmd command located in “C:ProjectsMicrosoft.Practices.ESBSourceSamplesManagementPortalInstallScripts”.
- Open the IIS manager, Select the ESB portal and check the authorization. If all fine, Browse the ESB portal directly from here.
- If some error occurred, Change the authorization and app pool setting by checking user access.
Repeat the same step to other server.
Note: Multi-Server Environment – (Two BizTalk Server and one SQL server)
Please let me know If any suggestion on this or Feel free to add some point.