Exchange 2010 List Room Mailboxes and Delegates Powershell Command

I need a powershell script that will list all the room mailboxes, their delegates, and if that room mailbox is set to forward meeting requests to delegates.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will SzymkowskiSenior Solution ArchitectCommented:
You cannot get delegate information from Powershell. You can however accomplish most of what you are looking for. See below...

GrantSendOnBehalfTo will give you a good indication of your delegates as delegates have this permissions when it is granted.

get-mailbox | ? {$_.ResourceType -eq "Room"} | select name, resourceType, GrantSendOnBehalfTo, Forwardingsmptaddress, forwardingaddress

Open in new window

fireguy1125Author Commented:
Thanks, how can I get the results in csv format, and the GrandSendOnBehalfTo shown as just the Display name and not the full AD path - I essentially want to get this into excel to distribute.
Will SzymkowskiSenior Solution ArchitectCommented:
Use the below command...

get-mailbox | ? {$_.ResourceType -eq "Room"} | select name, resourceType, GrantSendOnBehalfTo, Forwardingsmptaddress, forwardingaddress | export-csv "c:\resourcemailboxes.csv"

Open in new window

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

fireguy1125Author Commented:
Thanks, weird, but in the CSV its populating the GrantSendOnBehalfTo as the following in each item:


Your original showed valid data in the Powershell window - any ideas why that's the case?
Will SzymkowskiSenior Solution ArchitectCommented:
Its due to the property value.

try using | out-file "c:\resourcemailbox.csv"

instead of | export-csv "c:\resourcemailbox.csv"

this should work for you.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fireguy1125Author Commented:
Thanks! Happy new year!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.