This shows me all the counters… I need just the basic ones ( the ones that shows on the task manager console - Commit, In Use, pages, Total, Non Paged)
Can someone help me extracting the details in a CSV…
I have checked the details from the class but not getting an option of getting the details like Paged Memory, Non Paged Memory, In Use, Commit Memory
I need these in a csv format with appropriate headings.
If you want information on both physical and virtual memory you’ll have to collect it from multiple places. Virtual memory is a logical device for the operating system (as opposed to a physical device). You can get details on the pagefile from the Win32_PageFileUsage class and use Select-Object to get specific pieces, such as:
To get your CSV, you could collect the specific pieces of information that you want, store them in a custom object with the labels that you want, and then use Export-Csv.