The error I get from pkcs11-tool.exe is "No slots."
My server has a hardware security module (Nitrokey HSM 2) that becomes inaccessible once I connect to my server via Windows Remote Desktop.
Note: this is NOT for logging in with smart cards. I use my HSM to decrypt data with its private key.
I use this HSM with the pkcs11-tool.exe recommended by Nitrokey.
It does not matter whether or not I uncheck the box "Smart Cards or Windows Hello for Business". A workaround is to use a different program (AnyDesk) to connect to the server, but that is not a solution because I don't want to rely on a 3rd party remote access app.