Fix: Failed to connect to Windows service

Group policies are settings pushed into a computer’s registry to configure security settings and other operational behaviors. Group policies can be pushed down from Active Directory (actually, they’re pulled down by the client) or configured through local group policy.

Some users have reported seeing an error message in their computer’s Notification Panel with the heading, “Failed to connect to a Windows service,” and stating, “Windows could not connect to the Group Policy Client service. This problem prevents standard users from logging on to the system. As an administrative user, you can review the System Event Log for details about why the service didn’t respond.

Failed to connect to Windows service

The possible causes of the ‘Failed to connect to a Windows service’ error message.

This error arises when a computer crashes after the rebooting process during Windows Updates. The computer restarts after the crash and reports an unexpected shutdown during Windows Updates. Immediately following this, it starts displaying this error message. In most cases, this error message originates from the loss of crucial Registry settings required to initialize the Group Policy Client service.

How to Get Rid of the ‘Failed to Connect to a Windows Service’ Error Message.

How to Get Rid of the ‘Failed to Connect to a Windows Service’ Error Message.

Solution 1: Fix this problem by using the Registry Editor.

Press the Windows Logo key + R to open a Run dialog, type ‘regedit‘ into the Run dialog, and click on ‘OK.’ Doing so will launch the Registry Editor.

Failed to connect to Windows service1

In the left pane of the Registry Editor, navigate to the directory described below and check to see whether or not a folder named “gpsvc” is present. This folder is responsible for service configuration and parameters. In almost all cases, it will be present: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services.

Failed to connect to Windows service2

If gpsvc is present, then navigate to the directory described below in the left pane of the Registry Editor. This is an extremely important and fragile directory, so make sure that you don’t touch anything else.

HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows NT > CurrentVersion > SvcHost

Failed to connect to Windows service3
Inside the SvcHost folder, there must be some keys and values that are required for the process to be completed. Check for a multi-string value GPSvsGroup inside SvcHost. If it is not present, you will have to create it yourself. To create the multi-string value, right-click on the SvcHost folder, hover over ‘New,’ and click on ‘Multi-String Value.’

Failed to connect to Windows service4
Doing so will create a new registry value in the right pane. Rename the new multi-string value to GPSvcGroup by right-clicking on it, selecting Rename, typing in GPSvcGroup, and pressing Enter. Now, double-click on the GPSvcGroup value to modify it, replace whatever is in the Value data field with GPSvc, and click on OK.

Failed to connect to Windows service5

The next thing you might need to do is to create a new folder (key) inside SvcHost. To do so, right-click on SvcHost in the left pane, hover over “New,” and click on “Key.” Rename the new registry key to GPSvcGroup.

Failed to connect to Windows service6

Click on the GPSvcGroup key in the left pane to display its contents in the right pane. You now need to create two new DWORD (32-bit) values in the right pane of GPSvcGroup. To do so, right-click on an empty space in the right pane, hover over “New,” and click on “DWORD (32-bit) Value.” This process needs to be repeated two times to create a total of two new DWORD (32-bit) values.

The first value needs to be renamed as “AuthenticationCapabilities,” and it should have 12320 as its Value data and Decimal as its base.

Failed to connect to Windows service7

The second value needs to be renamed CoInitializeSecurityParam and should have 1 as its Value data and Decimal as its base.

Failed to connect to Windows service8

Close the Registry Editor.

Restart the computer and check to see whether or not the problem still persists once it boots up.

Solution 2: Try performing a clean boot on the affected computer.

  1. Press the Windows Logo key + R to open a Run dialog. Type “msconfig” into the Run dialog and click on “OK.2015-12-15_201005
  2. Navigate to the Services tab, enable the “Hide all Microsoft services” by checking the box beside it, and click on “Disable all.
  3. 2015-12-15_201139Next, switch to the Startup tab and disable all startup services. If you are using Windows 8/8.1 or 10, you will need to click on “Open Task Manager” when you arrive at the Startup tab. Then, one by one, right-click on the name of each application listed and click on “Disable” in the context menu. You can re-enable the applications later using the same procedure, but you should only re-enable apps that are truly necessary.
    2015-12-15_201336
  4. Restart the PC and check to see if the problem persists once it boots up.

Solution 3: Reset the affected computer’s Winsock catalog.

For some reason, many users affected by this issue have been able to resolve it by simply resetting their computers’ Winsock catalogs. To reset a Windows computer’s Winsock catalog, you need to:

  1. Open the Start Menu.
  2. Search for “cmd.
  3. Right-click on the search result titled “cmd” and select “Run as Administrator.” Doing so will launch an elevated Command Prompt.
  4. Type the following into the elevated Command Prompt, and press Enter:

netsh winsock reset

  1. Once the command has been fully executed, close the elevated Command Prompt.
  2. Restart the computer. Once it boots up, check to see whether resetting the computer’s Winsock catalog resolved the issue.

Solution 4: Allow full control of all relevant registry keys for administrators by using the Registry Editor.

  1. Press the Windows Logo key + R to open the Run dialog.
  2. Type ‘regedit‘ into the Run dialog and press Enter to launch the Registry Editor.
  3. In the left panel of the Registry Editor, navigate to the following directory:

HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > services

  1. In the left pane of the Registry Editor, right-click on the gpsvc sub-key under the Services key, and click on Permissions… in the context menu.
  2. Click on ‘Advanced.’
  3. Navigate to the owner.
  4. Under the “Change owner to:” section, click on “Administrators” to select it, enable the “Replace owner on subcontainers and objects” option by checking the box beside it, click on “Apply,” and then click on “OK.
  5. Repeat steps 4-5.
  6. Click on “Administrators” to select it, and then click on “Edit…“.
  7. Check the ‘Allow‘ box directly in front of ‘Full Control‘ and click on ‘OK‘.
  8. Enable the “Replace all child object permissions with inheritable permissions from this object” option by checking the box beside it.
  9. Click on ‘Apply‘ and then on ‘OK.’
  10. Click on Apply and then on OK, but this time in the Permissions for gpsvc
  11. Download the default configuration for the gpsvc registry key corresponding to the Windows version installed on the affected computer.

Windows Vista
Windows 7
Windows 8/8.1

  1. Now, return to the Registry Editor, click on File > Import….
  2. In the Import Registry File dialog, navigate to the location of the registry file you downloaded in step 14, click on the registry file to select it, and click on Open.
  3. You may be asked to confirm the import of the registry file or its merging with the affected computer’s registry, so be sure to confirm the action.
  4. Once the downloaded registry file has been successfully imported and merged with the computer’s registry, restart the computer. Afterward, check whether the issue has been resolved upon startup.

Solution 5: Turn off Fast Startup (applicable only for affected Windows 10 computers).

Many users affected by this problem, who have computers running on Windows 10, have had success in fixing this issue by turning off Fast Startup. This feature is designed to allow Windows 10 computers to boot up faster, but in many cases, it ends up becoming more of a nuisance than a blessing. In such cases, disabling Fast Startup has been able to resolve this issue. The following are the two ways you can go about disabling Fast Startup:

Method 1

  1. Right-click on the Start Menu button to open the WinX Menu.
  2. Click on Power Options.
  3. Click on ‘Choose what the power buttons do‘ in the right pane of the window.
  4. Click on “Change settings that are currently unavailable.
  5. Uncheck the checkbox beside “Turn on Fast Startup (recommended)” to disable it.
  6. Click on “Save Changes.
  7. Restart the computer.

Method 2

The second method that can be used to disable Fast Startup is to simply disable the Hibernate feature, delete the hiberfile, and disable Fast Startup as a result. You should use this method if Method 1 doesn’t work or if you want to disable Fast Startup and gain a bit of disk space (the hiberfile takes up disk space equal to the amount of RAM your computer has) simultaneously. However, it should be noted that using this method will also result in the loss of the Hibernate feature.

  1. Right-click on the Start Menu button to open the WinX Menu.
  2. Click on Command Prompt (Admin) to launch an elevated Command Prompt.
  3. Type the following into the elevated Command Prompt, and then press Enter:

powercfg -h off

  1. Close the elevated Command Prompt.
  2. Restart the computer.

Once you have used your preferred method to disable Fast Startup, you should no longer see the “Failed to connect to a Windows service” error message on your Windows 10 computer.

Solution 6: Manually create registry keys and registry values.

Before you make any registry configuration changes, we recommend that you back up the registry database. Why do you need to create a registry backup? In case of any misconfigurations, you can revert the registry database to its previous state when everything worked without any new problems.

  1. Hold the Windows logo key and type “regedit.

Right-click on regedit, and choose ‘Run as administrator.’

  1. Click “Yes” to confirm running Regedit as an administrator.
  2. Click on “File” and then…
  3. In our example, type the file namebackup24072017,” select “All” under the Export Range, and then click “Save.
  4. Navigate to the following location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost

  1. On the right side, you will see different value data. You need to select ‘netsvcs.’
  2. Right-click on netsvcs and then click Modify.
  3. In the next window, you will see that gpvsc is missing. You will need to click at the end of one value data and press Enter to write gpvsc, as shown in the following image.
  4. Click “OK.
  5. Right-click on Svchost, choose ‘New,’ and then click ‘Key.’
  6. Type ‘netsvcs‘ and press ‘Enter‘.
  7. Right-click on the white window background, then choose ‘New,’ and click ‘DWORD (32-bit) Value,’ regardless of whether you are using a 32-bit or 64-bit operating system.
  8. Type the name “CoInitializeSecurityParam” and press Enter.
  9. Right-click on CoInitializeSecurityParam and choose Modify.
  10. Change the value to 1 and click OK.
  11. Right-click on the white window background, select ‘New‘, and then click ‘DWORD (32-bit) Value‘, regardless of whether you are using a 32-bit or 64-bit operating system.
  12. Type the name ‘CoInitializeSecurityAllowLowBox‘ and press Enter.
  13. Right-click on CoInitializeSecurityAllowLowBox and choose Modify.
  14. Change the value to 1 and click “OK“.
  15. Right-click on the white window background, select ‘New,’ and then click ‘DWORD (32-bit) Value,’ regardless of whether you are using a 32-bit or 64-bit operating system.
  16. Type the name ‘AuthenticationCapabilities‘ and press Enter.
  17. Right-click on AuthenticationCapabilities and choose Modify.
  18. Change the value to 3020 and click “OK.
  19. Restart your Windows.
  20. Hold the Windows logo key and press R.
  21. Type “services.msc” and press Enter.
  22. Navigate to the service called Group Policy Client and check if it is running. If it is running, you have successfully solved your problem.

Solution 7: Starting System Event Notification Service

It is possible that the System Event Notification Service has been disabled, which can result in triggering this error. Therefore, in this step, we will enable and start the System Event Notification Service. To do so:

  1. Press the “Windows” and “R” keys simultaneously to open the Run prompt.
  2. Type in “services.msc” and pressEnter.
    Typing in “Services.msc” and pressing Enter
  3. Locate the “System Event Notification Service” and double-click on it.
    Double-clicking on the “System Event Notification Service”
  4. Click on the “Startup Type” dropdown and select “Automatic.
    Selecting Automatic
  5. Click on the “Start” option and then click on “Apply.
  6. Click on “OK” and check to see if the issue persists.
ABOUT THE AUTHOR

Kamil Anwar


Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.