After upgrading from Windows 8.1 to Windows 10 I stumbled upon an issue which prevented creating or joining a homegroup.
As it turns out – after a few days of digging into the matter – being unable to join or create a homegroup was due to an non-working 'Peer Networking Grouping Service'.
More specifically this service wasn't started so I tried starting it manually, but all there was was an error message: 'WIndows could not start the Peer Networking Grouping Service on Local Computer. Error 1068: The dependency service or group failed to start.'
- Open cmd (command prompt) with admin permissions and run: netsh winsock reset
- Navigate to "C:\ProgramData\Microsoft\Crypto\RSA\" folder and then rename 'MachineKeys' folder to 'MachineKeys.old'.