Skip to main content

Set PageFile

Overview

Configures the Windows page file settings on a specified drive, supporting both automatic and custom configurations. It supports two modes of operation:

  1. AutomaticManagedPagefile: Enables Windows-managed page file settings, allowing the operating system to automatically determine the size and location of the page file.
  2. Custom: Disables automatic management and applies user-defined initial and maximum page file sizes on a specified drive.

NOTE: This script requires administrative privileges and PowerShell 5 or higher.

Sample Run

Play Button > Run Automation > Script
SampleRun1

Search and select Set PageFile Image1

Set the required arguments and click the Run button to run the script.

  • Run As: System
  • Preset Parameter: <Leave it Blank>
  • Mode: Custom or AutomaticManagedPagefile
  • DriveLetter: <Drive Letter to Set PageFile for, default value is C:>
  • InitialSizeMB: <Initial size of the page file in megabytes (MB). Used only in 'Custom' mode.>
  • MaximumSizeMB: <Maximum size of the page file in megabytes (MB). Used only in 'Custom' mode.>
    Image2

Run Automation: Yes
RunAutomation

Parameters

NameExampleAccepted ValuesRequiredDefaultTypeDescription
ModeCustomCustom, AutomaticManagedPagefileTrueCustomDrop-DownSpecifies whether to use automatic or custom page file settings. Use 'AutomaticManagedPagefile' to let Windows manage the page file, or 'Custom' to specify your own size and location.
DriveLetterD:FalseC:String/TextDrive letter where the page file will be created (e.g., C:, D:). Defaults to the system drive if not specified.
InitialSizeMB8192False4096IntegerInitial size of the page file in megabytes (MB). Used only in 'Custom' mode. Defaults to 4096 MB.
MaximumSizeMB16384False16384IntegerMaximum size of the page file in megabytes (MB). Used only in 'Custom' mode. Defaults to 8192 MB.

Automation Setup/Import

Automation Configuration

Output

  • Activity Details