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_ct p \$($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
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_ct
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, -whatif worked a treat.