Link to home
Start Free TrialLog in
Avatar of brendan-amex
brendan-amex

asked on

PowerShell Cmdlet for Get-PublicFolder Information

I'm trying to pull information from our public folders using PowerShell to determine who has permissions and who has client permission on each of them. However I keep running into problems, below is what I'm trying to do and then my cmdlet that is currently failing.

I want to be able to grab all public folders, show it's Identity, then grab that public folders Admin Permission Users and list those, then grab that public folders Client Permission User and AccessRights and list those... then move onto the next Public folder and do the same thing. Any help is greatly appreciated!


Get-PublicFolder -Recurse | Format-List Identity | Get-PublicFolderAdministrativePermission -Identity * | Format-List User | Get-PublicFolderClientPermission -Identity * | Format-List User,AccessRights >c:\admin\PublicFoldersInfo.txt
Avatar of joyofsharing
joyofsharing
Flag of India image

Dear brendan-amex,

I hope you are running the command in the Exchange Management Shell.

Kindly keep us posted.



joyofsharing ( ^ _ ^ )
Avatar of brendan-amex
brendan-amex

ASKER

Yes of course I am.
Dear brendan-amex,

Thanks for letting me know.

I hope this helps you.
http://technet.microsoft.com/en-us/library/aa997615(v=exchg.80).aspx

Kindly keep us posted.


joyofsharing ( ^ _ ^ )
Thank you, I've already googled this extensively. I've seen all the Microsoft documentation and what I really need is a PS expert tell me where my error is in the syntax and help me fix it.

I think it's an issue with how I'm piping between Get-PublicFolder, Get-PublicFolderAdministrativePermission, and Get-PublicFolderClientPermission but I'm not sure.
E2k7?
ASKER CERTIFIED SOLUTION
Avatar of Rammestein
Rammestein
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This helped. In the end I ended up having to run:

Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Format-Table Identity,User,AccessRights | Out-File c:\Output.txt -Width 400

Then I had to run it again for Get-PublicFolderAdministrativePermission but in the end I got what I wanted. Thanks.