Windows 10 How to disable and remove a PIN via Powershell

  • Thread starter Thread starter Rocko___
  • Start date Start date
R

Rocko___

Hi All


Not a question but an Answer, took me a while to figure out how I could remove and disable a Windows Hello for Business PIN via powershell.


It's pretty simple actually, You can disable the PIN with the below two commands.


Set-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\System -Name "AllowDomainPINLogon" -Value 0
Set-ItemProperty HKLM:\SOFTWARE\Microsoft\PolicyManager\default\Settings\AllowSignInOptions -Name "value" -Value 0

This sets the Registry values to disabled for the local machine.


I then used the below command I found on a forum to take owner and remove the content inside the folder C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\NGC


If you're skeptical of the script (I know I was), take a backup of the folder above and remove the contents manually.


Start-Process cmd -ArgumentList '/s,/c,takeown /f C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\NGC /r /d y & icacls C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\NGC /grant administrators:F /t & RD /S /Q C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\Ngc & MD C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\Ngc & icacls C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\Ngc /T /Q /C /RESET' -Verb runAs

Continue reading...
 

Similar threads

M
Replies
0
Views
1
Maxime de Timary
M
J
Replies
0
Views
11
Joshua Small1
J
Back
Top