-1

Is it possible to programmaticaly configure COM+ service.

I need to do the following using C# or any script

  1. Open Administrative Tools -> Component Services
  2. Expand Components Services -> My Computer -> COM+ Applications
  3. Right Click HyperV Environment Manager(COM+ service name) andselect Properties.
  4. Click on Pooling & Recycling tab
  5. Under Application recycling, set Memory Limit(KB) value to 262144.
  6. Click OK
  7. Right Click HyperV Environment Manager(COM+ service name) and select ShutDown
  8. Right Click HyperV Environment Manager(COM+ service name) and select Start

It will be great if you could guide me or send me the code snippet.

Thanks in advance.

Regards, Sreejith Rajan

1

2 Answers 2

2

You can use Component Services Administration (COMAdmin) Library to programmatically accomplish the steps you outlined. One can access it from C#, VBScript, PowerShell, anything else that can harness the power of COM components.

VB6 code sample on Configuring COM+ Application Recycling Values MSDN page addresses exactly your need to configure Recycling properties. Check Setting application recycling settings for COM+ component from code / command line question for VBScript port of MSDN sample.

By the way, you do not have to restart target COM+ application for changes to take effect. I.e. the last two steps in your routine are redundant:

 7. Right Click HyperV Environment Manager(COM+ service name) and select ShutDown
 8. Right Click HyperV Environment Manager(COM+ service name) and select Start
Sign up to request clarification or add additional context in comments.

Comments

1

You should use HyperV's WMI to do this. There are many examples on the web, such as this one.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.