I have a Component Service Application which values need to be retrieved by a powershell script, I've managed to get some configurations like the Pooling & Recycling values with the following script
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 "-------------------------"
}
The script above works perfectly fine, but I want to retrieve the value of the "Remote Server Name" inpu that is located in the "Activation" Tab showed in the image bellow:
I've read trough the COMAdmin interfaces documentation in the microsoft website but I couldn't find this information.
You're looking for the ApplicationProxyServerName property
$applicationProxyServerName = $app.Value("ApplicationProxyServerName")