Author Archive: Chaitanya Talasila

Check Disk availability for Storage pool


If you want to check the any disks available to add in the storage pool for servers, you can use the below command.

Get-PhysicalDisk -CanPool $True

Below is the information regarding the storage pool.

The storage pool is a set of disks on which the Data Protection Manager (DPM) server stores replicas, shadow copies, and transfer logs. Before you can start protecting data, you must add at least one disk to the storage pool. Disks added to the storage pool should be empty.

Regards,

Chaitanya

Create folders if not exists


To Create file share folders if does not exists, below is the PowerShell code.

Test-path is PowerShell command let checks the existence of folder paths and using new-item command let you can create folders.

Code:

$sharearray ="fileshare1","fileshare2"

foreach ( $share in $sharearray)

{

if (-not (Test-Path -Path $share))

{

Write-host "$share not exists ,Creating it"

new-item -Path $share -ItemType Directory -Force

}

}

Regards,

Chaitanya

Check Command Execution History


Want to check the history of your executed commands in PowerShell session.

Use get-history command let.

You will get the ID from the result. If you want to execute the command based on the ID, you can use the invoke-history id

Regards,

Chaitanya

Certificate Status check across servers


If you want to check the certificate status for server, below is the script for that.

$ScriptBlockContent ={param ($Location)

Set-Location $Location

$certs =get-childitem

$certarr=@()

foreach ($cer in $certs )

{

$Error.Clear();

$arr+=[pscustomobject]@{ Location=$Location

isCertValid=$cer |Test-Certificate;

Cause=$Error[0];

thumbprint= $cer.Thumbprint;

Name=$cer.FriendlyName

Subject=$cer|select -expand subject

SubjectName=$cer.SubjectName

SignatureAlgorithm=$cer.SignatureAlgorithm

SerialNumber=$cer.SerialNumber

PublicKey=$cer.PublicKey

Issuer=$cer.Issuer

IssuerName=$cer.IssuerName

NotAfter=$cer.NotAfter

}

}

$certarr

}

$Location=’Cert:\LocalMachine\My’

$certlist=Invoke-Command -ComputerName ‘Server1′,’Server2’ -ScriptBlock $ScriptBlockContent -ArgumentList $Location

$certlist | ?{$_.isCertValid -eq $false}|Out-gridview

Regards,

Chaitanya

Importing BizTalk Application bindings


Hi All,

 

This is the  continuation for the below blog post.

 

https://sqlblogging.com/2016/11/19/export-application-bindings-from-the-any-biztalk-server-by-providing-the-application-names/

 

once you exported the bindings , you can copy the entire folder and try to run the below script.

In the same script folder.

 

If any error occurs , it halts the processing.

 

 

#region WriteLog function

 

function WriteLog($LogMessage, $LogDateTime, $LogType)

{

 

write-host

“$LogType, [“+ $LogDateTime +”]: “+ $LogMessage | Add-Content -Path $MainLogFilepath

}

 

 

$BiztalkSrvInfo = @{

‘MgmtDbname’=Get-CimInstance MSBTS_GroupSetting -namespace root\MicrosoftBizTalkServer|select MgmtDbName

‘MgmtDbServerName’=Get-CimInstance MSBTS_GroupSetting -namespace root\MicrosoftBizTalkServer|select MgmtDbServerName

}

 

$Obj = New-Object -TypeName PSObject -Property $BiztalkSrvInfo

 

 

$MgmtDbServerName = $Obj.MgmtDbServerName.MgmtDbServerName

$MgmtDbname = $Obj.MgmtDbname.MgmtDbName

 

 

$scriptpath = $MyInvocation.MyCommand.Path

$dir = Split-Path $scriptpath

 

 

$inputFiles = “$dir\Bindings\”

 

$LogFilepath = “$Dir\Logs\”

 

if(!(Test-Path $LogFilepath))

{

New-Item -ItemType directory -Path $LogFilepath

}

 

$LogFile = “$LogFilepath\ImportLogfile.txt”

 

TRY

{

 

Get-ChildItem -path $inputFiles -Filter *.xml -Recurse |ForEach-Object -Process{

 

$Actfilepath = $_.FullName

$filename = $_.BaseName

 

$LogDateTime = get-date

 

Write-host “***Starting  Importing of Bindings for Application : $filename in” + $inputFiles “folder” -ForegroundColor Cyan

 

$run = “BTSTask.exe ImportBindings /Source:$Actfilepath /ApplicationName:$filename /Server:$MgmtDbServerName /Database:$MgmtDbname”

 

Invoke-Expression $run  | Add-Content $LogFile

 

if ($LASTEXITCODE -eq 1)

 

{

$LogMessage = throw $_.Exception.Message

 

}

 

$LogDateTime = get-date

 

Write-host “Finished Extracting of Bindings for Application : $filename in ” + $inputFiles “folder” -ForegroundColor green

 

 

}

 

}

 

CATCH

{

 

$_.Exception.Message|Add-Content $LogFile

 

}

 

Let  me know if you have any questions.

 

Regards,

Chaitanya

 

Export Application bindings from the any BizTalk server, by providing the Application Names


Hi All,

You can export BizTalk Application bindings by using the below PowerShell script.

Simply give the application Names and it creates folder called Input files in your script folder incase if it does not exists and copies the files to that folders.

#region WriteLog function

function WriteLog($LogMessage, $LogDateTime, $LogType)
{

write-host
“$LogType, [“+ $LogDateTime +”]: “+ $LogMessage | Add-Content -Path $MainLogFilepath
}

$BiztalkSrvInfo = @{
‘MgmtDbname’=Get-CimInstance MSBTS_GroupSetting -namespace root\MicrosoftBizTalkServer|select MgmtDbName
‘MgmtDbServerName’=Get-CimInstance MSBTS_GroupSetting -namespace root\MicrosoftBizTalkServer|select MgmtDbServerName
}

$Obj = New-Object -TypeName PSObject -Property $BiztalkSrvInfo

$MgmtDbServerName = $Obj.MgmtDbServerName.MgmtDbServerName
$MgmtDbname = $Obj.MgmtDbname.MgmtDbName

$scriptpath = $MyInvocation.MyCommand.Path
$dir = Split-Path $scriptpath

$BindingFileDestinationPath = “$dir\Bindings\”

if(!(Test-Path $BindingFileDestinationPath))
{
New-Item -ItemType directory -Path $BindingFileDestinationPath
}

$LogFilepath = “$Dir\Logs\”

if(!(Test-Path $LogFilepath))
{
New-Item -ItemType directory -Path $LogFilepath
}

$LogFile = “$LogFilepath\ExportLogfile.txt”

$ApplicationObj = “Application1″,” Application2″,” Application3 ” # give the list of Application Names here that you want to export

TRY
{

$ApplicationObj |ForEach-Object -Process{

$ApplicationName = $_

$BindingFilePath = $BindingFileDestinationPath + $ApplicationName + “.xml”

$LogDateTime = get-date

Write-host “***Starting Extracting of Bindings for Application : $ApplicationName in” + $BindingFileDestinationPath “folder” -ForegroundColor Cyan

$run = “BTSTask.exe ExportBindings /Destination:’$BindingFilePath’ /ApplicationName:’$ApplicationName'”
Invoke-Expression $run | Add-Content $LogFile

if ($LASTEXITCODE -eq 1)

{
$LogMessage = throw $_.Exception.Message

}

$LogDateTime = get-date

Write-host “Finished Extracting of Bindings for Application : $ApplicationName in ” + $BindingFileDestinationPath “folder” -ForegroundColor green

}

}

CATCH
{

$_.Exception.Message|Add-Content $LogFile

}

Regards,
Chaitanya

[Fix]BizTalk Rules not working


Hi All,

We had one issue in our environment, where BizTalk rules were not getting fired.

We are able to process same rules in another environment.

After troubleshooting, we found the issue with BizTalk rule engine static support. In our rule, we use .net static class to fetch some information.

For that, we need to create the registry entry. This is must for BizTalk rules that uses .net static classes

https://msdn.microsoft.com/en-us/library/aa950269.aspx

regards,

Chaitanya

BizTalk Server 2013 R2 CU5 is available


Hotfixes that are included in cumulative update package 5 for BizTalk Server 2013 R2

The Microsoft Knowledge Base articles that discuss these hotfixes are published as the hotfixes become available. For more information about the BizTalk Server issues, click the following article numbers to go to articles in the Microsoft Knowledge Base.

BizTalk Server Adapter

KB article number Description
3121493 FIX: WCF-HTTP send doesn’t retry or suspend when it receives an error 500 in BizTalk Server 2013 R2
3189028 FIX: IDOCs sent with BizTalk WCF-SAP NCO adapter trigger a Syntax or Missing Segment error in SAP
3197184 WCF-SAP Nco Connector creates additional white spaces in BizTalk Server
3202533 FIX: MQSAgent2 delays or stops polling messages between Biztalk MQSeries adapter and the MQ server
3202534 FIX: The host instance stops when the HTTP Send port times out in BizTalk Server
3202535 FIX: The MIME/SMIME decoder in the POP3 adapter selects an incorrect MIME message part as the message body part in BizTalk Server 2013 R2
3202537 FIX: "Error occurred while browsing the LOB system" when you expand IDOC schema with new NCo connector type in BizTalk Server
3202703 FIX: NCO adapter changes the date and time format of DATS data type fields in BizTalk Server
3202705 FIX: MLLP Send Port does not Suspend on Timeout after you install Cumulative Update 1 for BizTalk Server 2013 R2
3202740 FIX: MQSeries adapter handles only one receive location at a time when ordered delivery is set in BizTalk Server
3202911 Fix: "Windows SharePoint Services raised an error message" warning if you don’t set the Archive Location URL in BizTalk
3203865 FIX: BizTalk Data Provider for SAP does not have the ConnectorType property
BizTalk Server EDI\AS2
KB article number Description
3080109 FIX: Can’t open RosettaNet home and partner organizations after you deploy a customized envelope schema in BizTalk Server
3109990 FIX: Batching orchestration performance is decreased under load in BizTalk Server
3202751 FIX: "Unable to create the entry in the AS2 EDIINT MIC table" error when message tracking is enabled in BizTalk Server

BizTalk Server Administration Tools and Management APIs

KB article number Description
3202894 FIX: You cannot change the Tracking QueryTimeout value when you use BizTalk Server 2013 R2

Source: MSDN

Regards,

Chaitanya

What’s new in BizTalk 2016


MSDN Source link:

https://msdn.microsoft.com/en-us/library/mt670742.aspx

Feature Description
Support for newer platforms BizTalk Server 2016 adds support for the following Microsoft platforms:

– Visual Studio 2015
– Windows Server 2016
– SQL Server 2016
– Office 2016

Hardware and Software Requirements for BizTalk Server 2016

SQL Server 2016 AlwaysOn Availability Groups Support includes:

– Using on-premises and in Microsoft Azure IaaS virtual machines
– Using for production workloads
– Provides a high available (HA) solution in Microsoft Azure

High Availability using SQL Server AlwaysOn

BizTalk Server Azure VMs in production BizTalk Server Azure virtual machines are now fully supported for production environments. Using SQL Server 2016 AlwaysOn, a highly available solution is now possible.

High Availability using SQL Server AlwaysOn

Logic App adapter Connect to your Logic Apps hosted in Azure, and get access to all the connectors including Salesforce, SharePoint, CRM Online, and more. For example, you can receive an order in BizTalk Server, connect to your Logic App, and update Salesforce.

Logic App adapter

FTP adapter SYST command is no longer required. When you configure the FTP adapter on a receive location or send port, there is a property called FTP Server Type. Using this property, you choose the FTP server you want; which determines if SYST is required.

As a result of this change, there are more "supported" FTP servers.

Configuring the FTP adapter

SFTP adapter SFTP adapter is re-engineered to use WinSCP to connect to SFTP; which allows support for more SFTP servers. Client-side logging and additional encryption ciphers are also new.

SFTP adapter

Allow import of tracking settings When importing a binding a file, you can choose to import (or not import) the tracking properties enabled on your orchestrations, send ports, and so on. This is a global setting (set at the Group level) so you can set this feature in your different environments. For example, you can import the existing tracking properties for your Development environments, and don’t import the tracking properties for your Production environments.

BizTalk Settings Dashboard, Group Page

Shared Access Signature (SAS) You can use SAS authentication for the Service Bus connection with the BasicHttpRelay, NetTcpRelay, BasicHttp, and WebHttpadapters.

WCF-BasicHttpRelay adapter
WCF-NetTcpRelay adapter
WCF-BasicHttp adapter
WCF-WebHTTP adapter

SB-Messaging adapter now includes the steps to get Access Control (ACS) values using PowerShell.

Ordered delivery on dynamic ports – Includes the adapters that support ordered delivery on static send ports
– You can enable the ordered delivery option in the BizTalk Administration console
SHA-2 hash functions SHA-2 is fully supported, including:

  • BizTalk can consume SHA2-signed certificates across all of its components
  • Supports the following Advanced Encryption Standard (AES) exchange system for signature keys in AS2, RosettaNet, and the MIME/SMIME encoder:
    • AES128
    • AES192
    • AES256
  • Supports the following SHA2-based MIC calculations for AS2:
    • SHA256
    • SHA384
    • SHA512
  • Supports the following SHA2-based digest methods in RosettaNet:
    • SHA256
    • SHA384
    • SHA512
  • SHA1 certificates will continue to work
Compile your maps Choose to compile your maps using XslTransform or XslCompiledTransform
Schema window In the BizTalk mapper, the Schema dialog window is now resizable
Office web components (OWC) Office web components (OWC) is now an optional installation component.
Adapters and Accelerators Improvements and changes include:

– SAP adapter now uses SAP Connector for .NET (NCo), while still supporting the classic RFC SDK. WCF-SAP adapter support for the SAP .NET Connector provides more details.
– BizTalk Accelerator for HL7: The MLLP adapter on a receive location now supports the option to initiate an outbound connection to a remote LOB listener.

Import/export parties Changes include:

– The import and export option is separated from the Application. For example, you can export a party without exporting the application. You can import a party without importing the application.
– Can choose which parties, business profiles, and agreements you want to import or export
– Can continue to import/export the business-to-business artifacts as you do in BizTalk Server 2013 R2, BizTalk Server 2013, and BizTalk Server 2010.

BizTalk Administration In addition to a more modern look and feel, some additional changes include:

– Configure the settings for multiple hosts/host instances simultaneously. For example, you can set the .NET CLR settings for multiple host instances simultaneously.
– Use the new Search feature to filter and find artifacts in your application, such as schemas, resources, and more.
– When troubleshooting suspended messages, you can save multiple suspended messages simultaneously to a file.

Using the BizTalk Server Administration console

Deprecated & Removed List

Program Status Replacement
RFID Mobile Removed None
RFID Server Removed None
SharePoint SSOM/Web Service adapter Removed Use the CSOM (Client Side Object Model) option.

Windows SharePoint Services Adapter

Appendix B: Install the Microsoft SharePoint Adapter

SOAP adapter Deprecated WCF-BasicHttp Adapter
Old SQL adapter Deprecated WCF-based SQL adapter in the BizTalk Adapter Pack
UDDI Removed None

Regards,

Chaitanya

Set Process Priority


You can set the priority of the process by using the priority class parameter. Below is small snippet for that

(Get-Process -Id $processID).priorityclass =2

Below are the priority values.

-2="Idle";-1="BelowNormal";0="Normal";1="AboveNormal";2="High";3="RealTime"

Regards,

Chaitanya

Design a site like this with WordPress.com
Get started