We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Configuring Virtual Memory with either GPO or script

richardmoses
richardmoses asked
on
Medium Priority
1,395 Views
Last Modified: 2008-03-17
Hello All,


Is there a setting in group policy to set virtual memory sizes on desktops in a domain? If not, does anyone know of a good script to do the same?
Comment
Watch Question

You can have the group policy for users to able to change the virtual memory or not. But not the size. You have to set size under system properties. It can be set under here: Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment

Author

Commented:
Are you saying I CAN set the size under Computer Configuration? Or only the ability for a user to do it?
I found this script in MS script center to change the size of a Page File. You can use this to set GPO
http://www.microsoft.com/technet/scriptcenter/resources/qanda/jan06/hey0118.mspx

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
The first reply is for user ability to change the virtual memory.
Like Star_trek said,

However, this should remain the default of "Let windows control virtual memory".

Messing with it across the board could cause some workstations to have too much or not enough virtual memory if you set it statically.

For instance if you set it to 768MB, and the workstation has 2GB of RAM (say an autocad machine), then 768MB isn't enough VM.

Vice versa, if you set it to 768MB and the workstation has 128MB of memory, that's just wasted space really.

Author

Commented:
I agree with not setting it statically across the board. My question is that if I set the policy to prevent users from customizing it, will it default it back to windows management even if they have already customized it?

For example, User1 sets his own virtual memory to 768mb.
Policy is put in place on his machine to not allow changes.
Does the 768mb setting stay, or does it go away?
Well, the GPO would be using the "script" that Star_Trek posted in it, so it would always run and change the page file back to what you would be statically setting.

Problem lies in that you aren't taking into account if they decide to move the pagefile to D: or something.  In that case the script would error out based on what it says currently (because it looks for C:\pagefile.sys)


If you are concerned about users changing it from the default, then the easiest way is to create a GPO that uses the:

user config >> admin templates >> desktop >> remove properties from the My computer context menu

and if you want to go even further, set the "Hide Specified control panel applets" under admin templates > control panel, and add sysdm.cpl


This will basically prevent any user that the GPO applies to (be careful that IT or users you need to have system panel access aren't in that OU), from being allowed into the My computer, properties, tabs.  Then they won't have the ability to change it via GUI.

Now obviously if they really really want it changed, they can script it, etc. if they are admins on the local machine....but this would handle 99% of cases.

Author

Commented:
So I would need to use the script to set it then?

Hope I'm not being completely ignorant here....
Use the script if you want to set it statically to something other than the default (which is Let windows decide).  The script is really designed as a local script, meaning that there aren't enough error corrections and input into it to take into account everyone in an organization.

I would leave the default myself, and just enable the settings I posted in the last post if you really want to disable them from getting to those settings.  Just remember that they won't be able to reach any of the tabs under My computer, properties.  If that's not a problem though, then go for it.

I would test it on a test OU, see if you like it, let management agree, then go forward with it in production.
I agree with TheCleaner, first try in test bed and if it works only then move it to production. 'Cos If the value you set is lower value than what it needs can be a problem, unless all your machines are similar.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.