BIZTalk2010 powerscript停止并启动SEND PORT
我的接收位置正常。 BizTalk2010 restart Receive location every hour
现在我需要对发送端口做同样的事情。但它不起作用。
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
答案 0 :(得分:1)
解决方案是
function getStatus(){
foreach ($sendPort in $Catalog.SendPorts | Where {$_.Name -eq $sndLocation })
{
return $sendPort.Status
} }
function enablesendLocation(){
foreach ($sendPort in $Catalog.SendPorts | Where {$_.Name -eq $sndLocation })
{
$sendPort.Status = 3
$Catalog.SaveChanges()
$Catalog.Refresh()
} }
function disablesendLocation(){
foreach ($sendPort in $Catalog.SendPorts | Where {$_.Name -eq $sndLocation })
{
$sendPort.Status = 2
$Catalog.SaveChanges()
$Catalog.Refresh()
} }