Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can any one of you please explain what is the exact powershell cmdlet for changing settings (Enabled or Disabled) in Gpedit.msc console...?

I need a exact query to link (Computer Configuration-->Administrative Templates-->System-->User Profiles--> Do not forcefully unload the users registry at user logoff-->'Enabled') in PowerShell.

Which means whenever we excutes the function it should Enable the mentioned setting from gpedit.msc console...

share|improve this question
    
Can you tell us what setting you're trying to change? –  splattered bits Jun 9 '12 at 23:35

2 Answers 2

It's not exactly what you're asking for, but it may be an easier way of accomplishing what you are wanting to do. Instead of writing a PowerShell script, you could always modify the registry (gpedit.msc seems to be mostly just a GUI for common registry changes).

You should be able to add the registry key 'DisableForceUnload' as a REG_DWORD in HKLM\Software\Policies\Microsoft\Windows\System . To enable the setting, set the value to 1. This website has a picture of the setting in use: http://pacsharepoint.com/2011/11/sharepoint-search-illegal-operation.html

You can then deploy the registry change across the computers that need it.

share|improve this answer

There is a good starting point on the Microsoft Technet site: Group Policy Cmdlets in Windows PowerShell.

share|improve this answer
    
Thanks for your reply, I have already read those steps. I need a exact query to link (Computer Configuration-->Administrative Templates-->System-->User Profiles--> Do not forcefully unload the users registry at user logoff-->'Enabled') in powershell. Which means whenever we excutes the function it should Enable the mentioned setting from Gpedit.msc console... –  Kodeesh Jun 9 '12 at 23:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.