Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Changing pagefile on Server 2012 from default to specific size and place.

$
0
0

I am trying to change the pagefile on my new servers from Automatically manage paging file size for all drives to Custom - C: drive Initial size 4096 and Maximum size 4096

 

If I can, I would like to be able to put it back to the original configuration too.

Here is what I have so far with the error I am getting.

PS C:\> Set-WmiInstance -Class Win32_PageFileSetting -Arguments @{name="C:\pagefile.sys"; InitialSize = 4096; MaximumSize = 4096}

Set-WmiInstance : Generic failure 

At line:1 char:1

+ Set-WmiInstance -Class Win32_PageFileSetting -Arguments @{name="C:\pagefile.sys" ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (:) [Set-WmiInstance], ManagementException

    + FullyQualifiedErrorId : SetWMIManagementException,Microsoft.PowerShell.Commands.SetWmiInstance

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles