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

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
Kodeesh
  • 21

2 Answers2

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.

Derek
  • 9
0

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