Advanced Windows PowerShell Scripting Video Training

Advanced Windows PowerShell Scripting Video Training
Advanced Windows PowerShell Scripting Video Training

Friday, September 10, 2010

How to determine the maximum page file usage in Windows 7?

In Widows XP, we could utilize the Task Manager to discover this. On the Performance tab, look under Commit Charge (K) and look at the Peak attribute.




On Vista and Windows 7, this information is no longer part of the Task Manager.





To discover the value of this attribute, I utilized PowerShell and WMI. On your client with Powershell installed:

- Click Start / All Programs / Accessories / Windows Powershell / Windows PowerShell ISE

- In the code pane at the top, enter this code:

$Computer = “LocaHost”

$Namespace = “Root\CIMv2”

Get-WMIObject –Class Win32_PageFileUsage –Computername $Computer –Namespace $Namespace | Select-Object PeakUsage

The value returned from this will be in MB and represent the largest amount of information the page file has stored since the client has been on.

No comments: