Avatar of Jerry Seinfield
Jerry Seinfield
 asked on

Powershell script to perform exchange admin tasks

Hi Experts,

I am kind of rush with the export of bulk mailboxes to a PST files and the EAC really sucks to perform bulk email searches and then export the results to multiple PST

Need you help to build a PowerShell script that basically will read from an input CSV file that contains exchange display name, database, and email address

So, for any member on the CSV file

Perform following tasks

' comment, the cmdlet below performs a new search against all sourcemailboxes specified there, but we should use display names for each user within the csv file

New-MailboxSearch -Name "Legal" -SourceMailboxes user1,user2 -TargetMailbox "LegalDiscovery" -StartDate "03/01/2013" -EndDate "07/02/2013" -SearchQuery 'Item1 OR item2'

' perform a search of the entire mailbox to a PST and no search criteria defined
New-MailboxExportRequest -Mailbox User1 -IncludeFolders "#Inbox#" -FilePath \\SERVER01\PSTFileShare\User1\User1.pst

'Once it finished the first search and export for the first user, will perform the remove-mailboxexportrequest to release resources. validate the pst has been created on the shared folder

Get-MailboxExportRequest | Remove-MailboxExportRequest

then repeat the entire process for each user in the CSV file

Can someone please help me with this request?
PowershellExchangeScripting Languages

Avatar of undefined
Last Comment
Will Szymkowski

8/22/2022 - Mon
Jerry Seinfield

ASKER
Any updates?

Please, do not neglect this question

Thanks in advance
ASKER CERTIFIED SOLUTION
Will Szymkowski

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck