mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-06-16 02:43:43 +00:00
Made the PowerShell code work in Windows PowerShell
This commit is contained in:
@ -111,8 +111,9 @@ certutil.exe -asn <path to signed policy file>
|
||||
|
||||
```powershell
|
||||
$CIPolicyBin = 'path to signed policy file'
|
||||
Add-Type -AssemblyName 'System.Security'
|
||||
$SignedCryptoMsgSyntax = New-Object -TypeName System.Security.Cryptography.Pkcs.SignedCms
|
||||
$SignedCryptoMsgSyntax.Decode((Get-Content -LiteralPath $CIPolicyBin -AsByteStream -Raw))
|
||||
$SignedCryptoMsgSyntax.Decode([System.IO.File]::ReadAllBytes($CIPolicyBin))
|
||||
$SignedCryptoMsgSyntax.Certificates | Format-List -Property *
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user