By David Wiseman (Administrator)Created 24 Feb 2008
My Rating:
Not Rated

Install Active Directory Database Performance Counters

Language:  VBScript


Windows XP No Windows 2003 Yes
Windows 2000 No Windows NT No
Vista Unknown Windows 2008 Unknown

Installs the Active Database performance counters on a domain controller.


Line Numbers: On  Off      Plain Text
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
objFSO.CreateFolder ("C:\Performance")
Set objCopyFile = objFSO.GetFile("C:\windows\system32\esentprf.dll ")
objCopyFile.Copy ("C:\performance\esentprf.dll ") 

WshShell.RegWrite _
    "HKLM\System\CurrentControlSet\Services\Esent\Performance\Open", _
        "OpenPerformanceData", "REG_SZ"
WshShell.RegWrite _
    "HKLM\System\CurrentControlSet\Services\Esent\Performance\Collect", _
        "CollectPerformanceData", "REG_SZ"
WshShell.RegWrite _
    "HKLM\System\CurrentControlSet\Services\Esent\Performance\Close", _
        "ClosePerformanceData", "REG_SZ"
WshShell.RegWrite _
    "HKLM\System\CurrentControlSet\Services\Esent\Performance\Library", _
        "C:\Performance\Esentprf.dll", "REG_SZ"
strCommandText = "%comspec% /c lodctr.exe c:\windows\system32\esentprf.ini" 
WshShell.Run strCommandText


Got a useful script? Click here to upload!


  Post Comment
Order By:  
User Comments
Posted On: 11/1/2019 4:36:20 AM

A wide collection of free emojis - lenny face meme

Posted On: 12/16/2019 6:31:10 AM

Hi, If you have a lot of sub OU, the clear member of genrerate error 0x80005000. Line : Set objGroup = GetObject("LDAP://" & strGroupDN) best regards. Online clicker heroes
Posted On: 1/20/2020 11:18:08 AM

Find detailed & unbiased review of top 10 stock brokers in india . Some of the best stock broker in India are Zerodha,wisdom capital Angel Broking & more

Posted On: 1/31/2020 2:53:04 PM

Your script is exceptionally updated about the new form of the database and people groups effectively to take a shot at this. Those association is working right now they have something beneficial for taking the interesting data. Our Best Ecommerce Website is additionally working in the database program and we likewise take a valuable exercise.

Posted On: 2/1/2020 1:12:17 PM

I am learning VBScript for our Amazon Advertising Agency website. In any case, I am attempting to concoct a few thoughts for contents on home PC. This is non-html code, it's increasingly similar to document framework stuff. Replicating records/envelopes, moving documents/organizers, checking substance of records for specific strings. What else would I be able to utilize VBScript for?

Posted On: 6/9/2020 10:11:29 AM

Posted On: 6/9/2020 10:12:42 AM

Wow you have written it nicely must read spiritual singles

Posted On: 7/18/2020 9:57:07 AM

Nice to see this post here and thanks for sharing this to us xem truc tiep bong da hom nay and truc tiep bong da

Posted On: 8/5/2020 9:44:26 AM [Edited 8/5/2020 9:44:37 AM]

I really wanted to send a small word to say thanks to you for the fantastic points you are writing on this site truc tiep bong da