This post was originally published here
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
———————————————————-
Advertisements