我正在运行一个脚本来获取特定组的成员。几乎所有这些群体(除了少数几个群体)都会导致
Get-ADGroupMember : The operation being requested was not performed because the user has not been authenticated
代码:
Get-ADGroupMember "Server Admins" -Server "abc.xyz.com" -Recursive
我可以这样做查看成员
Get-ADGroup "Server Admins" -Server "abc.xyz.com" -Properties members | select -ExpandProperty members
但是我想访问成员的属性,例如samaccountname,而不仅仅是查看其显示名称。为什么在某些组上出现ADGroupMember
错误?