title: Get COM+ Applications List
body: <p>I am building a report for COM+ Application Settings. 
  My first step is to read all the Applications.</p>
  
  <p>On my Local Computer thats not a problem, i do it like this:</p>
  
  <pre><code>$comAdmin = New-Object -com ("COMAdmin.COMAdminCatalog.1")
  
  $applications = $comAdmin.GetCollection("Applications") 
  
  $applications.Populate() 
  
  foreach ($application in $applications)
  {
          write-host $application.Name
  }
  </code></pre>
  
  <p>This is working very well! But i need to get the Information from a remote server. I tried to do it like this:</p>
  
  <pre><code>$Server = "chvmes01;chvmes02"
  $option = [System.StringSplitOptions]::RemoveEmptyEntries
  $ServerArr = $Server.Split(";",$option)
  
  foreach($s in $ServerArr){
          $comAdmin = Invoke-Command -Session $session -Scriptblock {New-Object -Com "ComAdmin.ComAdminCatalog"}
  
          $applications = Invoke-Command -Session $session -Scriptblock {param($comAdmin) $comAdmin.GetCollection("Applications")} -ArgumentList $comAdmin
  
          Remove-PSSession $session
  }
  </code></pre>
  
  <p>But this gives me the following error:</p>
  
  <blockquote>
    <p>Method invocation failed because
    [Deserialized.System.__ComObject#{790c6e0b-9194-4cc9-9426-a48a63185696}]
    does not contain a method named 'GetCollection'.</p>
  </blockquote>
  
  <p>I also tried to combine the commands like this:</p>
  
  <pre><code> $command1 = {
     New-Object -Com "ComAdmin.ComAdminCatalog" |
     .GetCollection("Applications")
  }
  
  
  $applications = Invoke-Command -Session $session -ScriptBlock $command1
  </code></pre>
  
  <p>Here i get the following error:</p>
  
  <blockquote>
    <p>The term '.GetCollection' is not recognized as the name of a cmdlet,
    function, script file, or operable program. Check the spelling of the
    name, or if a path was included, verify that the path is correct and
    try again.</p>
  </blockquote>
  
  <p>What am i missing??</p>