Avatar of ams_group
ams_group

asked on 

Stop a Exchange Management Shell Script

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
ExchangePowershellWindows Server 2003

Avatar of undefined
Last Comment
ams_group
Avatar of neilpage99
neilpage99
Flag of United States of America image

While the management shell window is open, hold down the <CTRL> key and press the "c" key. (i.e. CTRL+C). That will interrupt the processing of the script.
I agree with neilpage99 but you can also just shut the machine down normally. Database copies won't go anywhere.
ASKER CERTIFIED SOLUTION
Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS 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
Avatar of ams_group
ams_group

ASKER

Thanks, -whatif worked a treat.
Exchange
Exchange

Exchange is the server side of a collaborative application product that is part of the Microsoft Server infrastructure. Exchange's major features include email, calendaring, contacts and tasks, support for mobile and web-based access to information, and support for data storage.

213K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo