certutil.exe格式化powershell中的输出

时间:2015-09-18 09:29:21

标签: powershell certutil

我使用certutil.exe来获取已颁发证书的列表并将它们导出到.txt文件,即使我指定了format-table,autosize或wrap选项,输出也会以行的形式返回。这是我用过的命令,我哪里错了?

certutil.exe -view -restrict "Disposition=20" -out "Request.RequestID,Request.RequesterName,certificatehash,Request.SubmittedWhen" | Format-Table -autosize 

这里是输出:(复制前几个)

PS C:\Users\administrator.JLR> certutil.exe -view -restrict "Disposition=20" -out "Requ Schema:   Column Name                   Localized Name                Type    MaxLength  
----------------------------  ----------------------------  ------  ---------   Request.RequestID             Request ID                    Long    4 -- Indexed   Request.RequesterName         Requester Name    String  2048 -- Indexed   CertificateHash               Certificate Hash              String  128 -- Indexed   Request.SubmittedWhen       Request Submission Date       Date    8 -- Indexed

Row 1:   Request ID: 0x12 (18)   Requester Name: "JLR\QA-ADFS1$"   Certificate Hash: "13 24 46 54 fe 0b 6d 30 ff b8 b8 cd 55 e6 55 eb da 7d 15 bd"   Request Submission Date: 8/4/2015 10:24 AM

Row 2:   Request ID: 0x15 (21)   Requester Name: "JLR\svcSAM"   Certificate Hash: "94 2c 41 e0 2a d6 16 fc 74 bd ba 08 16 e8 a6 1c d2 4e 7e 12"   Request Submission Date: 8/4/2015 2:13 PM

Row 3:   Request ID: 0x17 (23)   Requester Name: "JLR\Administrator"   Certificate Hash: "24 b3 78 7b 69 db dc 6c d6 65 88 1c 7f b3 c6 ef 06 db 25 9b"   Request Submission Date: 8/4/2015 2:35 PM

Row 4:   Request ID: 0x25 (37)   Requester Name: "JLR\paul.charles"   Certificate Hash: "c4 00 20 df 0e 0b 65 29 b6 b3 c4 29 fa b7 a7 c6 c2 6b 44 c7"   Request Submission Date: 8/7/2015 3:31 PM

0 个答案:

没有答案