0

特定の件名を含む特定の日付に特定の個人に送信されたメッセージを削除するために、PowerShellコマンドを実行したいと思います。

これを行うPowerShellスクリプトについて、アドバイスまたは正しい方向を示していただけますか?

ご指導ありがとうございました。

かっこいいスクリプトを見つけました:

#Add Exchanage snapin
add-pssnapin Microsoft.Exchange.Management.PowerShell.Admin

#Get list of mailboxes to delete
$users=Get-Content C:\MailboxesToDelete.txt

#For Loop to delete them
foreach ($user in $users)
{
#Print to screen user mailbox to delete
$user
#Delete AD user and Mailbox
Remove-Mailbox -Identity $user -Permanent $true -whatif

#Remove the -whatif if you want to really delete some users.
}

ここから:

http://randomtechminutia.wordpress.com/2012/05/03/powershell-script-to-delete-exchange-mailboxes-in-mass/

しかし、これはメッセージではなくメールボックスを削除します!

4

1 に答える 1

1

Export-Mailboxコマンドレットのヘルプを参照してください。詳細はこちら:

http://technet.microsoft.com/en-us/library/bb266964(v=exchg.80).aspx

于 2012-10-06T11:09:59.287 に答える