Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Does anyone know of a PowerShell module or commands for administering COM+ components. In particular, I'd like to:

  • Query whether a COM+ application is installed/registered.
  • Start or Stop a COM+ application.
  • Install/register or uninstall/unregister COM+ application.

I am new to both PowerShell and COM+ so may be using the wrong terms (install vs register, etc).

Cheers

share|improve this question
1  
This upcoming webcast might be interesting to you: richardspowershellblog.wordpress.com/2011/04/03/… –  pk. Apr 6 '11 at 15:50

1 Answer 1

up vote 5 down vote accepted

List COM+ components

$comAdmin = New-Object -com ("COMAdmin.COMAdminCatalog.1")
$applications = $comAdmin.GetCollection("Applications") 
$applications.Populate() 

foreach ($application in $applications)
{

    $components = $applications.GetCollection("Components",$application.key)
    $components.Populate()
    foreach ($component in $components)
    {

        $dllName = $component.Value("DLL")
        $componentName = $component.Name

        "Component Name:$componentName"
        "DllName: $dllName`n"
    }
}

Stop/Start Components

$comAdmin.StartApplication("appName")
$comAdmin.ShutdownApplication("appName")

Install Com+ application using the InstallApplication method

# Refer to: http://msdn.microsoft.com/en-us/library/ms681806(v=vs.85).aspx
$comAdmin.InstallApplication("fileName")
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.