您的位置:首页 > 运维架构

Get ADUser Properties

2016-02-01 20:09 447 查看

from: https://richardspowershellblog.wordpress.com/2013/08/26/get-aduser-and-properties/

Get-AdUser and –properties

Posted on Monday 26 August 2013by richardsiddaway

The Get-ADuser cmdlet returns a small subset of properties by default:
PS> Get-ADUser -Identity Richard
DistinguishedName : CN=Richard,CN=Users,DC=Manticore,DC=org
Enabled : True
GivenName : Richard
Name : Richard
ObjectClass : user
ObjectGUID : b94a5255-28d0-4f91-ae0f-4c853ab92520
SamAccountName : Richard
SID : S-1-5-21-3881460461-1879668979-35955009-1104
Surname :
UserPrincipalName : Richard@Manticore.org

You can use the –Properties parameter to return more properties
Get-ADUser -Identity Richard -Properties *
returns all properties
You can select a subset of properties by specifying their names
Get-ADUser -Identity Richard -Properties MemberOf, Country

If you want to use wildcards you need to use select
Get-ADUser -Identity Richard -Properties * | select last*
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Powershell