Link to home
Start Free TrialLog in
Avatar of richardmoses
richardmoses

asked on

Configuring Virtual Memory with either GPO or script

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?
Avatar of star_trek
star_trek

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
Avatar of richardmoses

ASKER

Are you saying I CAN set the size under Computer Configuration? Or only the ability for a user to do it?
ASKER CERTIFIED SOLUTION
Avatar of star_trek
star_trek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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.
So I would need to use the script to set it then?

Hope I'm not being completely ignorant here....
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.