none
public folders script RRS feed

  • Question

  • Hello,

     

    I Want to set permission as “None” for all the users on public folders which are inactive since last 180 days.

    Please do let me know if you have any poweshell script for this purpose?

    Tuesday, July 7, 2015 5:26 PM

All replies

  • You can use the Remove-PublicFolderclientPermission cmdlet to remove client rights from a public folder  https://technet.microsoft.com/en-us/library/bb124573(v=exchg.150).aspx so you can do it with one line of code.

    >> inactive since last 180 days

    What's your definition of inactivity ? they haven't accessed the public folder (Exchange doesn't track this), Logged onto their mailbox?- use Get-MailboxStatistics easy one liner

    Cheers
    Glen

    Tuesday, July 7, 2015 11:28 PM
  • I dont want to remove public folders. I want to set public folders permission as “None” for all those users who have access right on the public folder.

    I want a list of all the public folder which were not accessed since last 180 days and then want to set all those public folders's permission as “None” for all users .

    Wednesday, July 8, 2015 1:06 PM
  • You can try using Get-PublicFolderStatistics for inactivity but be careful if you have multiple replicas of a folder http://blogs.technet.com/b/exchange/archive/2013/05/28/comparing-public-folder-item-counts.aspx that replication is healthy in your environment.

    There is no cmdlet to update existing Access Control Entries if it exists for a particular user to do what you want you might want to try to remove the existing entry first then add it back with the None permissions (note None is not a Deny ACE so it really does nothing but test it yourself in Outlook) see https://technet.microsoft.com/en-us/library/bb123522(v=exchg.141).aspx which has some samples for this.

    Cheers
    Glen

    Thursday, July 9, 2015 4:40 AM
  • 28 users have different permission all a particular public folder, let us say public folder path-

    \Test4\Test5\Test6

    I want to set permission to "None" for all user in this particular folders.

    Add-PublicFolderClientPermission -Identity "\\Test\Test1\Test2" -AccessRights None

    it is asking me for user name, i cant give user name each time for 28 users, so is there any command which will run and set none permission for all users on this folder.

    Thursday, July 9, 2015 2:59 PM
  • >>it is asking me for user name, i cant give user name each time for 28 users, so is there any command which will run and set none permission for all users on this folder.

    No there isn't you will need to loop through every Access control Entry eg use Get-PublicFolderClientPermission and then update each entry in turn.

    Cheers
    Glen

    Friday, July 10, 2015 5:57 AM