A cmdlet always consists of a verb (or a word that functions as a verb) and a noun, separated with a hyphen (the “verb-noun” rule). For example, some of the verbs include:
Get — To get something
Set — To define something
Start — To run something
Stop — To stop something that is running
Out — To output something
New — To create something (“new” is not a verb, of course, but it functions as one)
Get a list of 50 randomly selected servers from the Servers.txt file and store in a variable: Save a counter path in the $Counter variable and then get the counter values for all the servers.
Get a single value for all of the performance counters in the memory counter set on the local computer. First get the counter paths and then get the counter data for each counter:
1
2
$memCounters = (get-counter -list memory).paths
get-counter -counter $memCounters
The properties of the CounterSamples object can be used to examine, select, sort, and group data: