如何通过powershell脚本将COM PLUS组件的TRANSACTION ISOLATION LEVEL设置为Any。 我正在尝试使用以下代码
$comAdmin = New-Object -comobject COMAdmin.COMAdminCatalog
$apps = $comAdmin.GetCollection(“Applications”)
$apps.Populate();
foreach($app in $apps)
{
Write-Host $app.Name
if($app.Name -eq $ApplicationName)
{
$components = $apps.GetCollection("Components",$app.key)
$components.Populate()
foreach ($component in $components)
{
$componentName = $component.Name;
Write-Host "*"$componentName;
if($componentName -eq "WDA_DUP.Generic13")
{
$component.Value("TXIsolationLevel")=COMAdminTxIsolationLevelAny;
}
}
}
}
但没有达到目的。请帮帮我:) `
答案 0 :(得分:1)
工作脚本:
to