The pagefile.sys file, also known as a page or paging file, is a default system file found on [[Windows]]. A page file is a way for Windows to virtually extend the available memory on a system.^[[Why is my pagefile.sys so huge? | PDQ](https://www.pdq.com/blog/why-is-my-pagefile-sys-so-huge/)]
# Determine the appropriate page file size
# Managing the page file
## Check if page file size is set to system managed
```powershell
(Get-WmiObject Win32_Pagefile) –eq $null
```
If Automatic manage pagefile size for all devices is enabled, the output value is True.
## Disable system-managed page file size
```powershell
$sys = Get-WmiObject Win32_Computersystem –EnableAllPrivileges
$sys.AutomaticManagedPagefile = $false
$sys.put()
```
# Sources
[Introduction to the page file - Windows Client | Microsoft Learn](https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/introduction-to-the-page-file)
[Checking and Changing the Paging File Settings on Windows Server 2012 (R2) and Higher | SAP Help Portal](https://help.sap.com/docs/SLTOOLSET/b0c437ae5d1a4c70847bb55973923352/10e897079f084753baad95b897be8b31.html?version=CURRENT_VERSION)
[How to determine the appropriate page file size for 64-bit versions of Windows - Windows Client | Microsoft Learn](https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/how-to-determine-the-appropriate-page-file-size-for-64-bit-versions-of-windows)