Verifying the /3GB switch

by Mitch Tulloch [Published on 14 Aug. 2007 / Last Updated on 14 Aug. 2007]

How to verify memory allocation when the /3GB switch is used.

So you've got an Exchange Server 2003 machine and you've added /3GB /USERVA=3030 to the boot.ini file. How do you know that it's working? The simplest way is to query for the MaxProcessMemory size using WMI as follows:

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select MaxProcessMemorySize from Win32_OperatingSystem")
For Each objItem in colItems
Wscript.Echo "MaxProcessMemorySize: " & objItem.MaxProcessMemorySize

Here are the possible outputs:

2097024 means neither switches are working
3145600 means only the /3GB switch is working
3104640 means both the /3GB and /USERVA=3030 switches are working


Mitch Tulloch is lead author for the Windows Vista Resource Kit from Microsoft Press, which is THE book for IT pros who want to deploy, maintain and support Windows Vista in mid- and large-sized network environments. Mitch is also the author of Introducing Windows Server 2008, the first book from Microsoft Press about the exciting new server platform. For more information on these and other books written by Mitch, see

See Also

The Author — Mitch Tulloch

Mitch Tulloch is a well-known expert on Windows Server administration and cloud computing technologies. He has published over a thousand articles on information technology topics and has written, contributed to or been series editor for over 50 books.

Featured Links