检索组件服务 COM+ 应用程序配置值

检索组件服务 COM+ 应用程序配置值

我有一个组件服务应用程序,其值需要通过 powershell 脚本检索,我已设法使用以下脚本获取一些配置,例如池和回收值

Add-Type -AssemblyName "System.EnterpriseServices"
$comAdmin = New-Object -ComObject COMAdmin.COMAdminCatalog
$applications = $comAdmin.GetCollection("Applications")
$applications.Populate()
foreach ($app in $applications) {
    $appName = $app.Name
    Write-Output "Application Name: $appName"
    # Retrieve recycling properties
    $recycleLifetimeLimit = $app.Value("RecycleLifetimeLimit")
    $recycleMemoryLimit = $app.Value("RecycleMemoryLimit")
    $recycleCallLimit = $app.Value("RecycleCallLimit")
    $recycleActivationLimit = $app.Value("RecycleActivationLimit")
    $recycleExpirationTimeout = $app.Value("RecycleExpirationTimeout")
    # Output recycling properties
    Write-Output "  RecycleLifetimeLimit: $recycleLifetimeLimit"
    Write-Output "  RecycleMemoryLimit: $recycleMemoryLimit"
    Write-Output "  RecycleCallLimit: $recycleCallLimit"
    Write-Output "  RecycleActivationLimit: $recycleActivationLimit"
    Write-Output "  RecycleExpirationTimeout: $recycleExpirationTimeout"
    Write-Output "-------------------------"
}

但我想检索位于“激活”选项卡中的“远程服务器名称”,如下图所示: 在此处输入图片描述

相关内容