Toggle Smart Card Logon Requirement with Set-ScForceOption

Two-factor authentication with smart cards is becoming more common, but it can be a real pain when the computer is broken and Windows is refusing to allow a local account to logon for troubleshooting. The security setting Interactive logon: Require smart card may prevent console logons, but if the registry can still be accessed over the network, this requirement can be toggled.

I’ve covered this same method in the past with a vbscript, and a PowerShell GUI, but this function is designed to work more like a traditional PowerShell cmdlet. The problem of bypassing a smart card requirement also comes up often enough for me that I decided it warranted an update.