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




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

Reference - Get-PnPGroup

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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