public folders script

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?

July 7th, 2015 1:28pm

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

Free Windows Admin Tool Kit Click here and download it now
July 7th, 2015 7:30pm

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 .

July 8th, 2015 9:08am

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

Free Windows Admin Tool Kit Click here and download it now
July 9th, 2015 12:42am

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.

July 9th, 2015 11:01am

>>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

Free Windows Admin Tool Kit Click here and download it now
July 10th, 2015 2:00am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics