1

Does anyone know the PnPPowershell-code for gettings all the members of a certain SharePoint-group (in my case the Visitor-group).

Greetings,

P

3

You need to use Get-PnPGroupMembers command.

Use it as mentioned below where Identity would be the title of the group:

Get-PnPGroupMembers -Identity "Visitors Group Name"

Reference - Get-PnPGroupMembers

You can also use Get-PnPGroup command as well:

$group = Get-PnPGroup -Identity "Visitors Group Name" -Includes Users
$group.Users

Reference - Get-PnPGroup

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.