获取 AD 组属性

Get-ADGroup -Identity CreativeCenter


DistinguishedName : CN=CreativeCenter,OU=成员组,OU=集团,DC=hxx,DC=tt
GroupCategory     : Security
GroupScope        : Global
Name              : CreativeCenter
ObjectClass       : group
ObjectGUID        : fe545933-b24c-46cc-8d00-37db5753a33c
SamAccountName    : CreativeCenter
SID               : S-1-5-21-1396366169-2366585322-2236028602-1608

获取 AD 组所有属性

追加 -Properties * 参数获取详细属性
追加 | ft whencreated 参数筛选属性,必须 -Properties * 前置

Get-ADGroup -Identity CreativeCenter -Properties *


CanonicalName                   : hxx.tt/集团/成员组/CreativeCenter
CN                              : CreativeCenter
Created                         : 2021/10/6 21:12:55
createTimeStamp                 : 2021/10/6 21:12:55
Deleted                         :
Description                     :
DisplayName                     :
DistinguishedName               : CN=CreativeCenter,OU=成员组,OU=集团,DC=hxx,DC=tt
dSCorePropagationData           : {2021/10/25 17:28:00, 1601/1/1 8:00:01}
GroupCategory                   : Security
GroupScope                      : Global
groupType                       : -2147483646
HomePage                        :
instanceType                    : 4
isDeleted                       :
LastKnownParent                 :
ManagedBy                       :
member                          : {CN=何小瑶,OU=创意中心,OU=用户组,OU=集团,DC=hxx,DC=tt, CN=何依轩,OU=创意中心,OU=用户组,OU=集团,DC=h
                                  xx,DC=tt}
MemberOf                        : {}
Members                         : {CN=何小瑶,OU=创意中心,OU=用户组,OU=集团,DC=hxx,DC=tt, CN=何依轩,OU=创意中心,OU=用户组,OU=集团,DC=h
                                  xx,DC=tt}
Modified                        : 2021/10/6 21:29:56
modifyTimeStamp                 : 2021/10/6 21:29:56
Name                            : CreativeCenter
nTSecurityDescriptor            : System.DirectoryServices.ActiveDirectorySecurity
ObjectCategory                  : CN=Group,CN=Schema,CN=Configuration,DC=hxx,DC=tt
ObjectClass                     : group
ObjectGUID                      : fe545933-b24c-46cc-8d00-37db5753a33c
objectSid                       : S-1-5-21-1396366169-2366585322-2236028602-1608
ProtectedFromAccidentalDeletion : False
SamAccountName                  : CreativeCenter
sAMAccountType                  : 268435456
sDRightsEffective               : 15
SID                             : S-1-5-21-1396366169-2366585322-2236028602-1608
SIDHistory                      : {}
uSNChanged                      : 25583
uSNCreated                      : 25574
whenChanged                     : 2021/10/6 21:29:56
whenCreated                     : 2021/10/6 21:12:55

基于域组名称搜索所有域组

-Filter "name -like '*'" 模糊匹配所有字段

Get-ADGroup -Filter "name -like '*'" | ft Name,SamAccountName

Name                                         SamAccountName
----                                         --------------
Exchange Servers                             Exchange Servers
Exchange Organization Administrators         Exchange Organization Administrators
Exchange Recipient Administrators            Exchange Recipient Administrators
Exchange View-Only Administrators            Exchange View-Only Administrators
Exchange Public Folder Administrators        Exchange Public Folder Administrators
ExchangeLegacyInterop                        ExchangeLegacyInterop
Exchange Trusted Subsystem                   Exchange Trusted Subsystem
Network Configuration Operators              Network Configuration Operators
Performance Monitor Users                    Performance Monitor Users
Performance Log Users                        Performance Log Users
Distributed COM Users                        Distributed COM Users
Domain Computers                             Domain Computers
Domain Guests                                Domain Guests
RAS and IAS Servers                          RAS and IAS Servers
Incoming Forest Trust Builders               Incoming Forest Trust Builders
Terminal Server License Servers              Terminal Server License Servers
Users                                        Users
Domain Users                                 Domain Users
Guests                                       Guests
Group Policy Creator Owners                  Group Policy Creator Owners
Windows Authorization Access Group           Windows Authorization Access Group
Enterprise Admins                            Enterprise Admins
Domain Admins                                Domain Admins
Schema Admins                                Schema Admins
Server Operators                             Server Operators
Print Operators                              Print Operators
Replicator                                   Replicator
Administrators                               Administrators
Account Operators                            Account Operators
Backup Operators                             Backup Operators
Domain Controllers                           Domain Controllers
Cert Publishers                              Cert Publishers
Pre-Windows 2000 Compatible Access           Pre-Windows 2000 Compatible Access
Remote Desktop Users                         Remote Desktop Users
HelpServicesGroup                            HelpServicesGroup
TelnetClients                                TelnetClients
IIS_WPG                                      IIS_WPG
DnsAdmins                                    DnsAdmins
DnsUpdateProxy                               DnsUpdateProxy
Exchange Install Domain Servers              $131000-QNP5J77AJED2
CERTSVC_DCOM_ACCESS                          CERTSVC_DCOM_ACCESS
集团_创意中心                                 集团_创意中心
集团_研发中心                                 集团_研发中心
集团_营销中心                                 集团_营销中心
集团_设计中心                                 集团_设计中心
集团_投资中心                                 集团_投资中心
集团_品牌中心                                 集团_品牌中心

基于域组名称模糊搜索过滤目标域组

-Filter "name -like 'CNCS_*'" 模糊匹配部分字段
sort name 按名称排序

Get-ADGroup -Filter "name -like 'CNCS_*'" | sort name | ft name

Name
----
CNCS_北京人员
CNCS_成都人员
CNCS_广州人员
CNCS_杭州人员
CNCS_上海人员
CNCS_深圳人员
CNCS_武汉人员
CNCS_长沙人员

基于 OU(组织单位)范围搜索过滤目标域组

-SearchBase "ou=cdp,ou=cn,ou=group,ou=controlcenter,dc=hxx,dc=tt" 指定范围搜索

Get-ADGroup -Filter * -SearchBase "ou=cdp,ou=cn,ou=group,ou=controlcenter,dc=hxx,dc=tt" | ft name

name
----
CDP_华南大区
CDP_华北大区
CDP_东北大区
CDP_西南大区
CDP_西北大区
CDP_华东大区
CDP_华中大区


友情提示:本站所有文章,如无特殊说明或标注,均为何星星原创发布。与此同时,趋于近年来本站的文章内容频繁被他站盗用与机器采集,现已全局禁用网站文字内容操作,了解详情或转载文章请 点此 继续!

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用 * 标注