PS脚本中选择后的输出为空

时间:2016-03-24 10:47:43

标签: powershell

我试图从AD获取用户证书信息:

$user1 = Get-ADUser %username% -Properties “Certificates”
$user1.certificates | foreach {New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $_} | fl *

但是当我尝试从输出中select时,我会得到空数据,例如:

$user1 = Get-ADUser %username% -Properties “Certificates”
$user1.certificates | foreach {New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $_} | fl * | select subject

subject                                                                                                                     
------- 

它有什么问题?

0 个答案:

没有答案