Forum Discussion

Batuctm's avatar
Batuctm
Copper Contributor
Feb 22, 2022

Unable to export all public folder permissions to .CSV

Hello,

 

I've been trying to export a list of every single public folder user's permission to a csv file.

 

Its successful when I use :  get-publicfolder -recurse | get-publicfolderclientpermissions | export-csv XXX

, however it does only return about 10000 entries. If I add  resultsize -unlimited to the above script it returns nothing - the csv file is completely blank. Any ideas? I also need to get a list of permissions to all public folders for a single user ( we've about 1000 of them in our env and user would like to know to which folders he has an access to).

 

In addition it does return the below error now: 

 

 

  • If you are only interested in getting the permissions for a single user, use the following format:

    Get-PublicFolder -Recurse | Get-PublicFolderClientPermission -User vasil

    Might want to check any Default entries too, I suppose. And add the -ResultSize switch. Or better yet, use a full-blown script instead of one-liner.
    • Batuctm's avatar
      Batuctm
      Copper Contributor

      VasilMichev thanks but I've already tried that and it doesn't work. No matter what I add to the script it keeps returning that error:

       

      • That's why I mentioned that you'd be better off running a full-blown script instead of using the pipeline. Get a list of all the PFs, iterate over them and check the permissions, catch any errors and add proper handling to continue in the event of session disconnect.

Resources