如何通过 powershell 脚本将 COM PLUS 组件的事务隔离级别设置为任何。我正在尝试以下代码
$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;
}
}
}
}
但没有解决目的。请帮助我:)`