Skip to content

Instantly share code, notes, and snippets.

@CroMarmot
Created August 16, 2021 08:53
Show Gist options
  • Save CroMarmot/4c58249675083f6a9992996cfa8e5ebc to your computer and use it in GitHub Desktop.
Save CroMarmot/4c58249675083f6a9992996cfa8e5ebc to your computer and use it in GitHub Desktop.
FuckWin10FingerprintNotWorking
# https://answers.microsoft.com/zh-hans/windows/forum/all/%E6%9B%B4%E6%96%B0win10%E5%90%8E%E6%8C%87%E7%BA%B9/7fc55349-7234-4fd0-a3c1-04fcf20e2aaa?auth=1
# https://superuser.com/a/532109/679805
param([switch]$Elevated)
function Test-Admin {
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
if ((Test-Admin) -eq $false) {
if ($elevated) {
# tried to elevate, did not work, aborting
} else {
Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))
}
exit
}
net stop WbioSrvc
rm C:\WINDOWS\System32\WinBioDatabase\*
net start WbioSrvc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment