Event ID: 1023 Perflib errors

Below is the script we use to remedy the event 1023 error on our servers when we come across it. As usual, don’t forget to edit the email address.

Script Name: Event ID: 1023 Clean up Perflib errors on C, D, E


Script Description: This script fixes permissions on sqlctr80.dll file under SQL directories that causes problems with Kaseya and generates PERFLIB errors in the application event log
IF True


THEN


Get Variable


Parameter 1 : 4


Parameter 2 :


Parameter 3 : agentDrv


OS Type : 0


Get Variable


Parameter 1 : 6


Parameter 2 :


Parameter 3 : machineName


OS Type : 0


Execute Shell Command


Parameter 1 : forfiles.exe -p c: -s -m sqlctr80.dll -c “cmd /C cacls @PATH /e /g 0x22network service0x22:r >> #agentDrv#tempsqlfiles.txt”


Parameter 2 : 1


OS Type : 0


Execute Shell Command


Parameter 1 : forfiles.exe -p d: -s -m sqlctr80.dll -c “cmd /C cacls @PATH /e /g 0x22network service0x22:r >> #agentDrv#tempsqlfiles.txt”


Parameter 2 : 1


OS Type : 0


Execute Shell Command


Parameter 1 : forfiles.exe -p e: -s -m sqlctr80.dll -c “cmd /C cacls @PATH /e /g 0x22network service0x22:r >> #agentDrv#tempsqlfiles.txt”


Parameter 2 : 1


OS Type : 0


Get Variable


Parameter 1 : 1


Parameter 2 : #agentDrv#tempsqlfiles.txt


Parameter 3 : Sqlfiles


OS Type : 0


Send Email


Parameter 1 : *EMAIL@ADDRESS.COM*


Parameter 2 : #machineName#


Parameter 3 : #Sqlfiles#


OS Type : 0


Delete File


Parameter 1 : #agentDrv#tempsqlfiles.txt


OS Type : 0


ELSE

Advertisements

2 thoughts on “Event ID: 1023 Perflib errors

  1. nice script, but you may want to change steps 5 and 6 to use >>>> instead of >> to avoid overwriting your log file

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s