user wants to search emails for everybody in the organization

so I want to run script to make him delegate for all mailbox users in the company

so he can search emails or calendars

is there any command I can run
Who is Participating?
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.

AmitIT ArchitectCommented:
Which version of Exchange. If Exchange 2010, you can use search mailbox command. For permission you can use add mailbox permission.
pramod1Author Commented:
it is exchange 2007, what command should I run so that user A has delegate access to all other mailbox users or employees in the company
AmitIT ArchitectCommented:
You can use below command:

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox') -and (Alias -ne 'Administrator')} | Add-MailboxPermission -User -AccessRights fullaccess -InheritanceType all -AutoMapping:$false

Ensure Business Longevity with As-A-Service

Using the as-a-service approach for your business model allows you to grow your revenue stream with new practice areas, without forcing you to part ways with existing clients just because they don’t fit the mold of your new service offerings.

Patrick BogersDatacenter platform engineer LindowsCommented:

Why on earth you want that, this user have to add all mailboxes to his e.g. Outlook and download ALL content.
Anteaters, you can do it. Exchange 2010 and newer.

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox') -and (Alias -ne 'Admin')} | Add-MailboxPermission -User <theiwanttoreaddallusername> -AccessRights fullaccess -InheritanceType all

pramod1Author Commented:
I have exchange 2007
AmitIT ArchitectCommented:
I have also added automapping to false above. So mailbox doesn't maps to user mailbox automatically. Try it out.
Patrick BogersDatacenter platform engineer LindowsCommented:

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