campbell1972
asked on
Formatting Powershell Get-Counter Output
I'm looking to create an HTML table populated with a number of performance counters derived from the Get-Counter command.
The table should consist of 3 columns only: Set, Counter, Value.
I've performed the usual Google searches looking for an example but nothing has met the above criteria as of yet.
Does anybody have any useful pointers or examples I could refer to to achieve the above?
The table should consist of 3 columns only: Set, Counter, Value.
I've performed the usual Google searches looking for an example but nothing has met the above criteria as of yet.
Does anybody have any useful pointers or examples I could refer to to achieve the above?
ASKER
I've now got this working by creating an array consisting of all the counters I wish to snapshot and passing this through a get-counter statement to tidy up the output
What I would now like to do is parse the Path property (i.e. \\server\set\counter) so that server, set and counter may be presented as three separate objects in the final select statement.
Any pointers as to how best to perform this parsing within the confines of a select statement and subsequently renaming the property?
Many Thanks
What I would now like to do is parse the Path property (i.e. \\server\set\counter) so that server, set and counter may be presented as three separate objects in the final select statement.
Any pointers as to how best to perform this parsing within the confines of a select statement and subsequently renaming the property?
Many Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great stuff Qlemo ... learnt plenty of syntax today!
Thanks again for the help.
JC
Thanks again for the help.
JC
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
name maybe something different. The great pro with PowerShell is that you can try at the command prompt, and refine your command until satisfied.