• RSS
  • Twitter
  • FaceBook

Checking Page File Location On Remote Computers

  • Section(s): Administrator, Admin , Admin
  • Published on Nov 25, 2010.
  • Last Modified on Oct 31, 2009.
  • Last Modified by Nirmal Sharma.
  • Rated 4 out of 5 based on 1 votes.
This article explains how you can check the Pagefile location on remote computers.

There is no any easiest way to check the Pagefile on remote computers. You have to visit each computer individually to check Pagefile location. By default, the Pagefile is stored on the C:\ drive in the default installation. Let's say you have 1000 servers in your environment and are not sure where the Pagefile is stored. You need this data for audit purpose. As a manual process, it may take some considerable amount of time.

You can use the below script to accomplish this:

Steps:

  • Create a Text File: CompList.TXT
  • Put all the Server names in this file
  • Next, put the following lines in a file and save it as PageLoc.CMD
  • ***START HERE***
  • @ Echo Off 
  • Echo Server Name, Pagefile Location >> Result.CSV
  • FOR /F "Tokens=*" %%L IN (CompList.TXT) DO (
  •     SET ServerName=
  •     SET ServerName=%%L
  •     REG Query \\%%L\HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management /v pagingfiles > StoreOutput.TXT
  •     FOR /F "Tokens=REG_MULTI_SZ" %%N IN (StoreOutput.TXT) DO SET PGLocation=%%P
  •     Echo !ServerName!, !PGLocation! >> Result.CSV
  • )
  • ***END HERE***

The above script queries the registry on each server mentioned in the CompList.TXT and checks the location of Pagefile. The output is saved in Result.CSV in the below format:

  •     Server1   C:\Pagefile
  •     Server2   D:\Pagefile
  •     Server3   E:\Pagefile

 

About Nirmal Sharma

Nirmal is a Microsoft MVP in Directory Services and working as a Technical Architect/Consultant. He has been involved in Microsoft Technologies since 1994 and followed the progression of Microsoft Operating Systems and software. He is specialized in Directory Services, Microsoft Clustering, SQL, MOM, Exchange and Citrix. In his spare time, he likes to help others and write "internal" technical articles, white papers and tips on various Microsoft technologies. You can contact him at nirmal_sharma@mvps.org.


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?