VB Script
--
Questions
--
Followers
Top Experts
Process(*)\Virtual Bytes
Looking for a script that will retrieve the value for this counter for each server, then write it to a log file.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Just so I know I've got the right process counter, can you just run the following script to check its returning the correct value, as there's several different process memory counters to choose from...
Once you've confirmed I have the right one I can modify it to check all your servers and output to a text file (or an on-screen prompt if that would be preferred)
This will list all current processes and the virtual memory they are using
Set objWMI = GetObject("winmgmts:\\.\root\cimv2") 
Set colObjects = objWMI.ExecQuery("Select * From Win32_Process")  
For Each Item in colObjects
	WScript.Echo Item.Name & " - " & Item.VirtualSize
Nex






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
If Lcase(Item.Name) = Lcase(strProcess) then
this will convert everything to lowercase before doing the comparison.
Just looking at some of my processes, it may be better to do this in case you ever run it against a different process in the future

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
VB Script
--
Questions
--
Followers
Top Experts
VBScript (Visual Basic Scripting Edition) is an interpreted scripting language developed by Microsoft that is modeled on Visual Basic, but with some important differences. VBScript is commonly used for automating administrative and other tasks in Windows operating systems (by means of the Windows Script Host) and for server-side scripting in ASP web applications. It is also used for client-side scripting in Internet Explorer, specifically in intranet web applications.