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.

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
add comment

1 Answer 1

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
add comment

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.