Scripting Blog [archived]

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

Use PowerShell Cmdlet to Filter Event Log for Easy Parsing

  Summary: Learn how to use the Get-WinEvent Windows PowerShell cmdlet to filter the event log prior to parsing it. (image) Hey, Scripting Guy! I am confused. I have enjoyed using the Get-EventLog Windows PowerShell cmdlet. It is fast, and easy to use. However, I do not always like the way it seems to return all the records from a remote...

Hey, Scripting Guy! How Can I Check My Event Logs to See Why My Computer Isn’t Performing Well?

(image) Hey, Scripting Guy! I am trying to chase down a problem I have on my computer. Every so often, it just quits responding. I think it may be trying to talk to Elvis or commune with E.T. Perhaps if I point my finger and say, "E.T. gone home" in a raspy drone-like voice it would cease and desist all illogical activities and begin to ...

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...