Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to setup Performance Counters on a Windows Server 2008 R2 server and have successfully setup the counters. The problem is that I need to manually start the counters each time the server is restarted.

I found a neat trick to add the "logman" command to the registry to start the counters automatically, however, this command does not work because the command requires elevation.

Is there a way to elevate this command? Please note that as I have the command in the registry, I am unable to just simply run the CMD program as Administrator. I am happy to consider any suggestions or work arounds, so long as they are simple and work!

share|improve this question
up vote 0 down vote accepted

Possibly you could use srvany.exe from the windows 2003 server resource kit, and launch Logman as a service.

There are several ways you might accomplish this - start the service with credentials, or use logman command line credentials

share|improve this answer
command line credentials are not ideal as this would mean having elevated credentials in clear text in the registry. Running as a service may work, though I feel this is over complicating it. You did give me an idea though, I may be able to run this as a Scheduled Task that runs on Startup. – pjscott Sep 15 '11 at 1:58
Right. Your choice - launch the service with credentials (which are protected by windows), or use Logman's command line, which is not protected by windows. Although you could set Logman's launch parameters in a vb script and encode it, or compile a windows batch file, which would mask user and password. – RobW Sep 15 '11 at 18:03
Scheduled task has worked for me. thanks! – pjscott Sep 23 '11 at 1:12

Your Answer


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.