Hello. Long time lurker, first time poster. Please be gentle.
I am relatively new to PowerShell, but have used bat/cmd files for all sorts of automation.
After beginning the Powershell 3 “lunches” book, I found a website that went into some detail about the different Win 7 boot time events (100-110) in the Applications and Services Logs | Microsoft | Windows | Diagnostics-Performance location.
What I would like to do is create a powershell script I can run on multiple machines that will:
Get-EventLog -LogName Application and Services | Export-CSV -Path \sharedlocation\file.csv /noclobber
What I’m not sure how to do is to just have it see the Application and Services event log, then pull the Diagnostics-Performance logs only. Help is appreciated with that piece. Looking at it in the Event Log, I can see it’s really just Powershell with a GUI doing the heavy lifting, but I can’t “see” how to get this just in Powershell.
And I’m not looking for someone to write the script for me, just looking for someone to help push me in the right direction. Maybe with what to look for within the get-help commands to get me where I want to be? Maybe Get-EventLog isn’t how I get to the Applications and Services log? Does Powershell have access to that location? Maybe a way to set it up as a PSDrive?
Thanks in advance!