2

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!

pjscott
  • 23
  • 4

1 Answers1

0

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

RobW
  • 2,766
  • 1
  • 17
  • 22
  • 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 01: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