Learn about Windows PowerShell
Summary: In Advanced Event 10, you want to create a CSV log file of all the counters in the Processor counter set.
About this event
Date of Event
4/13/2012 12:01 AM
4/20/2012 12:01 AM
You are a server admin, and you are concerned about the processor performance of one particular server. You decide to use Windows PowerShell to create a CSV log file of all the counters in the Processor counter set. You decide to take the counter snapshot at two-second intervals for a total of ten snapshots. You plan to analyze the data in a Microsoft Excel spreadsheet. An acceptable output is shown in the figure that follows. Create the CSV file in the Documents special folder for the current logged-on user. The file name should be servername_processorCounters.csv.
2012 Scripting Games: All Links on One Page
I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at email@example.com, or post your questions on the Official Scripting Guys Forum. Good luck as you compete in this year’s Scripting Games. We wish you well.
Ed Wilson, Microsoft Scripting Guy
on first sight ... this one seems to be an easy task!
The second design point is confusing me ... why shouldn't the output be readable by Excel?
The last point is quite clear ... but: What about error handling, comment based help ....?
Looking at the first column of the spreadsheet ... my output won't be identical!
Have you made any changes after loading the results in excel before you took the picture?
I don’t seem to be able to submit a script for this event.
I get the error "Data Errors •You can only submit one script per event!"
I’ve already submitted to Beginner 1-10. Are you allowed to post for both Beginner and Advanced Events (if you feel up to it)?
You can only participate in ONE category!
Ugh. I don't have a clue where to start on this one... (well, I have some ideas, but I don't know how to make it look pretty like that, especially with a one-liner). Time to get my research hat on!
What is the value of cell A1? As in, what is the data in that cell supposed to represent? Originally, I had it populated with the hostname of the machine but I see that is "EDLT" in the image and am now sure what (PDH-CSV ??) is... I'm done except for this part.
Scratch my previous comment - got it! Helpful hint: Use Get-Command to look up relevant cmdlets. There are some you may not know exist ;).
Cell A1 looks like some disfigured timestamp to me. Not sure what it is supposed to represent.
@Jaap Brasser that is minutes, seconds and milliseconds.
What time zone is the 'Due Date', I've worked out it is several hours behind my time, though missed a few cut-offs due to not being certain. Would be useful knowing.
When exporting to CSV the German Excel likes a ; as a delimiter otherwise all columns are jammend into one cell. May be thats meant with "readable output"
Whats wrong with complex scripts by the way (as long as I know whats going on;)
The timezone is PST (-8 UTC)
Thanks for clarifying IamMred.
Thanks for the clarification on the Timezone, though unfortunately I still managed to miss it for Event 7 by 3 minutes. Oh well, at least I still learnt lots. :o)
With this one however, on my system (Win7 x64) there is no 'documents' special folder. Should this be 'mydocuments' ??