N
N
Nikita2015-07-07 11:08:15
PowerShell
Nikita, 2015-07-07 11:08:15

How to unload all objects using Get-ADGroupMember?

There is a command:
Get-ADGroupMember -Identity $group –Recursive
which unloads users from a variable in which the name of the AD access group lies.
Everything would work well if there were only users in the group, but the group contains objects such as: " External security principal " upon meeting which, the command ends its work with an error:

Get-ADGroupMember : The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFa
ults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client,
or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.

External Security Principal - A user that has been added to a group from another domain in AD.
The question is not how to bypass the restriction and still unload users, the question is how to unload users and the External Security Principal .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Soroka, 2015-07-16
@oleg40a

Either with an LDAP request
or like https://gallery.technet.microsoft.com/scriptcenter...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question