Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Hey, Scripting Guy! How Can I Check the Size of My Event Log and Then Backup and Archive It If It Is More Than Half Full?

(image) Hey, Scripting Guy! We have recently enabled additional security auditing on our network, and I do not want to increase the size of those logs due to the fact that they are already huge. I do not want to turn on circular logging because I need to keep an audit trail for compliance reasons. I need to write a script that I use to check...

Hey, Scripting Guy! How Can I Query Event Logs to Discover Active Directory Information?

(image) Hey, Scripting Guy! We have this problem at work. I keep finding groups in Active Directory, and I do not know why they were created or by whom. I am wondering if there is some way to search Active Directory to see who created a group. Is there an owner attribute or something that would let me know who created it? If I can find that...

How Can I Backup an Event Log to a Text File?

(image) Hey, Scripting Guy! How can I backup an event log to a text file?-- IMBDS(image) (image) (image) Hey, IMBDS. You know, the Scripting Guys have dedicated their lives to helping others. (Well, OK, originally we dedicated our lives to having others help us. But when no one seemed very interested in that we changed our minds.) That ...

How Can I Write a Script That Increments a Counter Each Time a Log File is Updated?

(image) Hey, Scripting Guy! How can I write a script that increments a counter each time a particular log file gets updated?-- HJ(image) (image) (image) Hey, HJ. You know, lately the Scripting Guy who writes this column has been victimized by a disturbing phenomenon: he keeps getting phone calls from machines. For the past several nights ...