导出Active Directory中用户的所有属性和值

时间:2018-01-11 14:15:33

标签: powershell active-directory

In" Active Directory用户和计算机"在Windows上,我可以查看所有属性及其值的列表。

我需要以某种方式导出这个值列表,以便我有一个列具有属性名称,一个列具有值,就像在图片中一样。

enter image description here

我尝试使用PowerShell执行此操作

Get-ADUser smith -Properties * -value | Get-Member -MemberType property | Out-File "filename.csv"

但这只是给我一个属性名称的列表,而不是值。

如何使用PowerShell将属性编辑器中的所有内容导出到文件?

1 个答案:

答案 0 :(得分:1)

我不确定你是如何结束这段代码的,因为它包含了许多不必要的补充,最终导致你没有你想要的东西。

您需要做的就是

Get-ADUser smith -Properties * | Out-File "filename.csv"
相关问题