use powershell to set component services transaction timeout

Viewed 3633

I'm trying to automate an application deployment using Powershell. One step requires that I go into Component Services to My Computer properties and set the Transaction timeout to 0.

The answer at Powershell COM+ settings seems the most promising answer to me, but I've been unable to map the Transaction Timeout setting.

Looking at the COM+ Administration Collections page: http://msdn.microsoft.com/en-us/library/windows/desktop/ms687763(v=vs.85).aspx I see there is a LocalComputer collection but I'm unable to retrieve a properties collection from the LocalComputer collection object, which is where I guess the Transaction Timeout property would be.

Here's my little exploratory code:

$comAdmin = New-Object -com ("COMAdmin.COMAdminCatalog.1")

$applications = $comAdmin.GetCollection("LocalComputer")
$applications.Populate()

$properties = $applications.GetCollection("PropertyInfo",$application.key)
foreach ($property in $properties){
    Write-Host $property.name
}

Can anyone help me set the Transaction Timout?

Update: This script at least gets me the TransactionTimeout value:

$comAdmin = New-Object -com ("COMAdmin.COMAdminCatalog.1")
$LocalColl = $comAdmin.Connect("localhost")
$LocalComputer = $LocalColl.GetCollection("LocalComputer",$LocalColl.Name)
$LocalComputer.Populate()

$LocalComputerItem = $LocalComputer.Item(0)


$LocalComputerItem.Value("TransactionTimeout")
2 Answers
Related