troubleshooting Question

Stop a Exchange Management Shell Script

Avatar of ams_group
ams_group asked on
ExchangeWindows Server 2003Powershell
4 Comments1 Solution1559 ViewsLast Modified:
Hi,

I'm wanting to test the following script which exports all mailboxes in a database to PST files. We are use Exchange 2010 SP1

foreach ($i in (Get-Mailbox -ResultSize Unlimited|Where {$_.Database -eq "Database Name"})) { New-MailboxExportRequest -Mailbox $i -FilePath "\\ServerName\pstexport_ctp \$($i.Alias).pst" }

Once the script starts processing mailboxes, how can it be stopped? Will simply closing the command Window do the trick? I only want it to run for long enough to ensure that it is working.

Thanks
ASKER CERTIFIED SOLUTION
Neil Russell
Solution Development Specialist

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros