title: use powershell to set component services transaction timeout
body: <p>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.</p>
  
  <p>The answer at <a href="https://stackoverflow.com/questions/6508874/powershell-com-settings">Powershell COM+ settings</a> seems the most promising answer to me, but I've been unable to map the Transaction Timeout setting.</p>
  
  <p>Looking at the COM+ Administration Collections page: <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms687763(v=vs.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/windows/desktop/ms687763(v=vs.85).aspx</a> 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.</p>
  
  <p>Here's my little exploratory code:</p>
  
  <pre><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
  }
  </code></pre>
  
  <p>Can anyone help me set the Transaction Timout?</p>
  
  <p>Update: This script at least gets me the TransactionTimeout value:</p>
  
  <pre><code>$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")
  </code></pre>