Display pagefile (VBScript)
This code can be found in
Chapter 2 of Windows Server Cookbook
Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.
Find out how to download all of the VBScript code from this site.
' This code displays the current page files on the system.
' ---------------------------------------------------------------
' From the book "Windows Server Cookbook" by Robbie Allen
' ISBN: 0-596-00633-0
' ---------------------------------------------------------------
' ------ SCRIPT CONFIGURATION ------
strComputer = "."
' ------ END CONFIGURATION ---------
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colPF = objWMI.InstancesOf("Win32_PageFileUsage")
for each objPF in colPF
Wscript.Echo objPF.Name
Wscript.Echo " Initial Size: " & objPF.AllocatedBaseSize
Wscript.Echo " Max Size: " & objPF.CurrentUsage
WScript.Echo " Peak Usage: " & objPF.PeakUsage
WScript.Echo
next
|
This code has been viewed 1431 times.
|
New from the creators of TechTasks.com:
StatSheet.com
|