导出用户服务器2008 R2

我在单台服务器上使用Server 2008 R2,未安装AD。 当我进入服务器pipe理器,并右键单击本地用户和组下的“用户”文件夹,我可以select“导出列表”,这将创build一个很好的我的用户的文本文件。 我已经使用了命令行networking用户,但只显示用户名。 导出选项是否可从命令行使用?

尝试:

get-wmiobject -class win32_useraccount | Select-Object Caption, FullName, Name, Description 

在PowerShell中,看看是否给你你想要的。 然后你可以导出为文本:

 get-wmiobject -class win32_useraccount | Select-Object Caption, FullName, Name, Description | out-file c:\users\you\documents\accounts.txt 

或csv:

 get-wmiobject -class win32_useraccount | Select-Object Caption, FullName, Name, Description | export-csv c:\users\you\documents\accounts.csv 

pipe他呢。