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.
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
BizTalk Server EDI\AS2
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 |
| SQL Server 2016 AlwaysOn Availability Groups | Support includes:
– Using on-premises and in Microsoft Azure IaaS virtual machines |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| Shared Access Signature (SAS) | You can use SAS authentication for the Service Bus connection with the BasicHttpRelay, NetTcpRelay, BasicHttp, and WebHttpadapters.
WCF-BasicHttpRelay 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:
|
| 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. |
| 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. |
| 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. |
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. |
| 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