Unable to set or remove a login PIN on Windows 10

After receiving no replies here, I asked this question over on Microsoft's support site. I'm copying the reply I got there, with the one modification I had to make to get it to work.

Step #1: Delete the Ngc folder.

  1. Use your password to log in to Windows 10.
  2. Open File Explorer and paste this in the URL box: C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft.
  3. Right click Ngc folder and choose Properties.
  4. Navigate to Security tab and click on Advanced button.
  5. Locate the Owner section at the top and click Change link.
  6. Enter the object name to select enter Administrators, if you’re using administrator account, or your user name and click Check Names and click OK.
  7. Check Replace owner on subcontainers and objects and click Apply and OK. Now you should be able to access the Ngc folder.
  8. Open the Ngc folder and perform steps 3-7 on each subfolder.
  9. Open Ngc folder, select all files and folders in it and delete them.

Step #2: Start creating a new PIN.

After you’ve deleted everything from Ngc folder, you can create new PIN for your Windows 10 device by doing these steps:

  1. Go to Settings app, then Account Settings.
  2. Choose Sign-in Options and click Add a PIN.
  3. Follow the instruction to add a new PIN.
  4. Test your PIN using the Command Prompt (Admin).
  5. If you cannot find the Command Prompt Admin, you can enable it using Command Prompt and typing net user administrator /active:yes
  6. After enabling built-in administrator account, you may logon and try resetting the password of the account which is not working. You may disable it later once you are done by entering net user administrator /active:no in Command Prompt. You can use this also if you want to change passwords or PINs in other User Accounts.

Note: I don't know whether it's permissible to copy this answer as I did, even with my one addition. If it isn't, feel free to edit this answer and just link to the solution.