2

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...

1
  • Can you tell us what setting you're trying to change? Commented Jun 9, 2012 at 23:35

2 Answers 2

1

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.

1
  • "It's not exactly what you're asking for" He wants to use powershell to script off the change so he can automate it.
    – Phill
    Commented May 31, 2018 at 8:55
0

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

1
  • 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
    Commented Jun 9, 2012 at 23:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .