Error Creating Pagefile Value Out Range
(עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeWindows Server 2012Windows Server 2008 R2Windows Server 2003LibraryForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Disabled automatic pagefile management, now have pagefile on every volume Windows Server > Server Core Question 0 Sign in to vote Hi,On my test server I turned off automatic pagefile management using the wmic command below wmic computersystem where name=”
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management to set a custom pagefile configuration on a server or a computer whenever required. PowerShell can also be used to set the pagefile configuration. The Microsoft All-In-One Script members published on the Technet gallery a Script to configure virtual memory page file size (PowerShell) The old fashioned way with the WMI commandline utility is another option. See for example: http://marckean.wordpress.com/2012/09/26/windows-server-2012-hyper-v-server-command-line-configuration-2/ However I don't recommend to use the WMI Win32_Pagefile class on Windows Server 2012 because it's deprecated. ([wmiclass]'Win32_PageFile').GetText("MOF") Let's try https://social.technet.microsoft.com/Forums/windowsserver/en-US/46acf090-1da0-42b2-8a37-5628d7fc8068/disabled-automatic-pagefile-management-now-have-pagefile-on-every-volume?forum=winservercore to discover how to set it without the Win32_Pagefile WMI class. We can start enumerating other WMI classes that have the occurence of the word "pagefile" in their name: Get-CimClass -ClassName *PageFile* We can list all the properties of the Win32_PageFileUsage WMI class: Get-CimInstance Win32_PageFileUsage | fl * The Allocatedbasesize property (768 in my example) is actually the size https://p0w3rsh3ll.wordpress.com/2013/03/17/pagefile-configuration-and-guidance/ of the page file on the disk expressed in MB: (Get-ChildItem c:\ -Attributes H,S | ? Name -eq "pagefile.sys").Length /1MB You should also be aware that by default, the pagefile is and this flag is actually a property of the Win32_ComputerSystem WMI class. gwmi Win32_ComputerSystem | fl AutomaticManagedPagefile Get-CimInstance CIM_ComputerSystem | gm -Name AutomaticManagedPagefile As you can see in the above picture, this flag can be written. For sure, Powershell will allow us to configure the pagefile using WMI or CIM. Now that we can foresee how to set it, let's try to figure out how much to set. Finding the appropriate guidance is the most difficult part and I'll prove it. The Windows XP recommendation that you can find on this page For best performance, do not set the initial size to less than the minimum recommended size under Total paging file size for all drives. The recommended size is equivalent to 1.5 times the amount of RAM on your system. has been erected as a somehow immutable law. Even if the Microsoft All-In-One Script m
am using a VHD with native boot. Therefore, I copy host.vhdx to the physical drive and use bcdboot to create a boot entry. This causes the host.vhdx file to have the drive letter C: on boot, and the physical disk http://www.networksteve.com/forum/topic.php/Pagefile_settings/?TopicId=94264&Posts=13 has drive letter D: Basically, what I need to be able to do is set https://dirteam.com/sander/2007/12/27/page-files-in-server-core/ pagefile settings for drive D: Win32_PagefileSetting sees and allows me to set the min/max pagefile size on C:. But it does not see D: I can see D:\pagefile.sys with Win32_PagefileUsage, but that does not let me set any values. If I go in through the GUI, I can set min/max on both C: and D:, but I have not been able error creating to figure out how to see D: so I can set values via Win32_PagefileSetting. I need to set D: because Windows is looking for pagefile.sys on this drive during the boot process before it has loaded host.vhdx. Because it was automanaged, now thatI turned off automanaged, I get a message every time I log in telling me that Windows has changed my pagefile settings. Here is the code that works fine for setting the value on C: error creating pagefile What I need is some way to set the values for D: before I reboot the system to have all the changes take effect, just like what would happen if I were using the GUI. I just can't figure out how to get to D: I don't think this would be an issue if I were not using native VHD boot. $computerSystem = Get-WmiObject -Class Win32_ComputerSystem -EnableAllPrivileges $computerSystem.AutomaticManagedPagefile = $false $computerSystem.Put() | Out-Null $pageFileSetting = Get-WmiObject -Class Win32_PageFileSetting $pageFileSetting.InitialSize = 1024 $pageFileSetting.MaximumSize = 4096 $pageFileSetting.Put() | Out-Null After I use the GUI to set min/max for both C: and D: and reboot, I can then see both C:pagefile.sys and D:pagefile.sys with Win32_PagefileSetting. So if I can use the GUI to do this, it seems like I should be able to use PowerShell/WMI, but I can't figure out what I need to do to get to D: October 12th, 2015 4:54pm Hi, Have you tried setting the Name property to specifically point to D:? https://msdn.microsoft.com/en-us/library/aa394245%28v=vs.85%29.aspx Free Windows Admin Tool Kit Click here and download it now October 12th, 2015 7:10pm Unless you're going to make it better, don't re-invent the wheel:https://gallery.technet.microsoft.com/scriptcenter/Script-to-configure-e8d85fee October 12th, 2015 9:12pm Thanks, Mike. I had reviewed that code, but it does not work in my situation. It assumes the pre-existence of information that can be obtained from the Win32_PagefileSetting. In my case, I cannot retrieve Win32_Pagefi
be an exception when it comes to tuning the page file for optimal performance and reliability. What the page file is The page file is usually described as a file that allows to use disk storage for data that do not fit into physical RAM. Other names for the page file are the ‘swap file' and the ‘paging file'. Most administrators wouldn't mind their page file settings, since they stuffed the server with RAM. Windows will always use the page file however, regardless of the amount of physical RAM. The page file is located on the boot partition (or volume) by default, represented with the C:\pagefile.sys file. After a clean install the initial size of the file varies with the amount of physical RAM in the server. Page file best practices There are a couple of page file best practices: Make your page file a fixed size and make your page file size roughly between 1,5 and 2,5 times larger than the amount of physical RAM. Place your page file on a separate partition (or volume) to prevent page file defragmentation. A non-fragmented page file allows for better page file performance than a fragmented page file since the head of the hard disk won't have to skip to the next part of the page file. Windows Server 2008 Full installations and Server Core installation both share the same installer routine up to a certain point. Because the check for the system requirements is done before choosing a specific Windows Server 2008 version the same memory requirements for Full installations and Server Core installations apply. Default page file settings in Server Core By default Server Core installations of Windows Server 2008 have an automatically configured page file, which is roughly 2x the size of the physical RAM. Since Server Core doesn't have explorer.exe as its default shell I think it's a good thing Server Core has an automatically configured page file. The Operating System will adjust the size of the page file according to the needs of the box. It's unlikely you will run into serious problems as long as you have thought your server dimensions through and do not install memory leaking (web)applications. Page file Management Microsoft has decided to change Page File Management in Server Core around the Beta 3 era. In early versions of Server Core you could use the SCregEdit.wsf script with the PF switch. I included the command line switches for these early versions to complete this post. Windows Server Codename "Longhorn" In the Windows Server Codename "Longhorn" era (up until 3 week