Prev | Current Page 644 | Next

Joezer Cookey-Gam, Brendan Keane, Jeffrey Rosen, and Jonathan Runyon

"Professional Windows PowerShell for Exchange Server 2007 Service Pack 1"

The $args special
variable is an array of the arguments that were passed to the script on the command line. The first item
in the array is the first parameter specified on the command line. The following example uses a single
argument in the script to specify the file to open and parse the contents of it so that you can determine
which mailbox stores the script needs to modify:
Add-PSSnapin *Exchange* | out-null
$MBItems = get-content -path $args[0]
You use the Get-Content cmdlet to open the filename that you passed on the command line. Next, for
each line read in from the file, you are going to run a Set-MailboxDatabase cmdlet to set the defaults
that have been defined for your Exchange users. For a detailed discussion of the Set-MailboxDatabase
cmdlet please reference Chapter 8 . You will want to construct a Set-MailboxDatabase command that
sets all relevant settings to meet your standard.
foreach ($objItem in $MBItems)
{
Set-MailboxDatabase $objitem -IssueWarningQuota 300MB -ProhibitSendQuota 400MB -
ProhibitSendReceiveQuota 600MB -ItemRetention 21.00:00:00 -MailboxRetention
21.00:00:00 -RetainDeletedItemsUntilBackup:$true
}
Next you need to create the text file that will have a list of the mailbox stores that you want to apply this
policy to. In this file you should list each store ??™ s identity on its own line.


Pages:
632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656
proces leczenia wciągarki linowe texas holdem zasady Party Poker noclegi swinoujscie