Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Lets the System manage the Page File
#region get Script directory
function Get-ScriptDirectory
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
$scriptdir = Get-ScriptDirectory
#region Let the System manage the Virtual Memory
Add-Content -Value $scriptdir -Path "C:\temp\Applog.log"
Import-Module "$scriptdir\AdjustVirtualMemoryPagingFileSize.psm1"
Add-Content -Value "Loaded the Module " -Path "C:\temp\Applog.log"
Set-OSCVirtualMemory -SystemManagedSize -DriveLetter "C:" | Add-Content -Path "C:\temp\Applog.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment