过滤搜索用户类型

Get-ADObject -Filter 'ObjectClass -eq "user"' -SearchBase "OU=cnList,OU=testGroup,DC=hxx,DC=tt" | ft name

name
----
陈振浩
莫海翰
高海元
欧丽霞
唐小龙
王鑫
刘玉莲
段小亚
陈越
余条玲
温雪冬
张莎莎
甘善莹
曾翔宇
旷名杨
冯珊珊
张睿
吕佳依

搜索所有对象类型

Get-ADObject -Filter * -SearchBase "OU=testGroup,DC=hxx,DC=tt" | ft name

name
----
testGroup
曹蓬勃
ExchangeActiveSyncDevices
samsungSMG9550§e9316428f8bf87c276eced25ce9de7b6
刘浩波
刘淑艳
ExchangeActiveSyncDevices
iPhone§c4e1676852f2d37ca869c395b4fad3be
殷明彪
孙樱轩
ExchangeActiveSyncDevices
iPhone§3d23e57a67108018f4550cf4ccdfc0aa
胡晶
李定城
testGroupII
陈振浩
ExchangeActiveSyncDevices
iPhone§7bb2cb3bb5697e114268757b93c28d0f
iPhone§8f9b5300645fb7d45fed973df054127f
莫海翰
高海元
ExchangeActiveSyncDevices
iPhone§ab8bfcde985eb3426ddde9685e9b08c6
iPhone§4f6aa2583552f37629c8953da38ed525
欧丽霞
ExchangeActiveSyncDevices
iPhone§5L7SKUHV795UBD07V7H9IRV7BG
唐小龙
ExchangeActiveSyncDevices
Android§androidc546889534
Android§androidc244101731
iPhone§8IA5Q2DEET2DT7BL6FL2HFSQAS

搜索所有对象并以对象类型排序

Get-ADObject -Filter * -SearchBase "OU=testGroup,DC=hxx,DC=tt" | sort ObjectClass | ft Name,ObjectClass

Name                                             ObjectClass
----                                             -----------
notice-region                                    group
notice-group                                     group
notice-store                                     group
iPhone§K9FNC45BAH1AT8V8FIV9HN91EO               msExchActiveSyncDevice
iPhone§a92d8f438873577c08c2237a0768e96e         msExchActiveSyncDevice
iPhone§81236175f168d772dfdea343db4c3b06         msExchActiveSyncDevice
iPhone§ceb59460e1fffde8ba7b0ee5077353aa         msExchActiveSyncDevice
HONORANYAN00§96d3a3906d022a11f2631dd7a3996b09   msExchActiveSyncDevice
Android§5630A2C55CE040FB                        msExchActiveSyncDevice
iPhone§8IA5Q2DEET2DT7BL6FL2HFSQAS               msExchActiveSyncDevice
Android§androidc244101731                       msExchActiveSyncDevice
android§3585971136882448597113688244            msExchActiveSyncDevice
iPhone§8f9b5300645fb7d45fed973df054127f         msExchActiveSyncDevice
iPhone§ab8bfcde985eb3426ddde9685e9b08c6         msExchActiveSyncDevice
iPhone§QB4FCOSIH11QPCPAV676P02EE0               msExchActiveSyncDevice
iPhone§7bb2cb3bb5697e114268757b93c28d0f         msExchActiveSyncDevice
iPhone§6SV2JI8L3D5K199DBRGHJ4RLP8               msExchActiveSyncDevice
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
ExchangeActiveSyncDevices                        msExchActiveSyncDevices
testGroup                                        organizationalUnit
testGroupForMD                                   organizationalUnit
testGroupforCC                                   organizationalUnit
杜雨桐                                           user
高海元                                           user
胡晶                                             user
欧丽霞                                           user
莫海翰                                           user
刘晨华                                           user
黄雅静                                           user
刘萍                                             user
腾树玉                                           user
康泽                                             user
张虹                                             user
刘晨露                                           user
宋佳凝                                           user
高倩                                             user

仅获取用户类型的对象

仅使用 Get-ADUser 以获取用户对象

Get-ADUser -Filter * -SearchBase "OU=cnList,OU=testGroup,DC=hxx,DC=tt" | ft name

name
----
陈振浩
莫海翰
高海元
欧丽霞
唐小龙
王鑫
刘玉莲
段小亚
陈越
余条玲
温雪冬
张莎莎
甘善莹
曾翔宇
旷名杨
冯珊珊
张睿
吕佳依

0 条评论

发表评论

Avatar placeholder

您的电子邮箱地址不会被公开。