PowerShell Function to Set Page File Initial/Maximum Size

The PowerShell 2.0 function below, Set-PageFile, sets a page file to the given initial and maximum size. At first sight this seems to be an easy task – just set the properties InitialSize and MaximumSize accordingly (Win32_PageFileSetting class). The tricky part is that the system won’t let you change any page file setting as long […]