Created
July 12, 2021 09:02
-
-
Save JohnLBevan/589681c620313733cd68fe565140e312 to your computer and use it in GitHub Desktop.
See https://social.technet.microsoft.com/Forums/windows/en-US/156d3b56-0863-47fb-851f-82ea78a7cff2/error-source-capi2-id-513-cryptographic-services-failed-while-processing-the-onidentity-call-in?forum=w8itprogeneral for a detailed description of the issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# This script fixed the below issue | |
| Log Name: Application | |
| Source: Microsoft-Windows-CAPI2 | |
| Event ID: 513 | |
| Task Category: None | |
| Level: Error | |
| Keywords: Classic | |
| User: N/A | |
| Description: | |
| Cryptographic Services failed while processing the OnIdentity() call in the System Writer Object. | |
| Details: | |
| AddLegacyDriverFiles: Unable to back up image of binary Microsoft Link-Layer Discovery Protocol. | |
| System Error: | |
| Access is denied. | |
| . | |
| #> | |
| $path = 'c:\Windows\system32\DRIVERS\mslldp.sys' | |
| $nt = [System.Security.Principal.NTAccount]::new('NT AUTHORITY\SERVICE') | |
| $read = [System.Security.AccessControl.FileSystemRights]::Read | |
| $allow = [System.Security.AccessControl.AccessControlType]::Allow | |
| $ar = [System.Security.AccessControl.FileSystemAccessRule]::new($nt, $read, $allow) | |
| $acl = (Get-ACL -Path $path) | |
| $acl.AddAccessRule($ar) | |
| Set-Acl -Path $path -AclObject $acl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment