I'm attempting to come up with a powershell script that would allow me to export a list of sites and subsides and the permission groups there in to a CSV.

I'm familiar with using the cmdlts but not building whole scripts. I'm able to use:

Get-SPOSiteGroup  | Export-CSV C:\...

To export site groups to a CSV but it doesn't include the name of the sites they are in.

I also found a script online that would print out the sites and subsite in my site collection here: Powershell to list all sites and subsites in SharePoint Online

I'm not sure how to marry the information. I'm trying to export to a CSV a list of sites and subsites and the security groups there in.

I try to run:

get-sposite | Get-SPOSiteGroup **webdite**

And get error message: "Get-SPOSiteGroup : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input"

I'm not sure how to get all of this to work together.

Your Answer

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

Browse other questions tagged or ask your own question.