working on script to enable online archive for exchange 2010 users .. need assistance

hello, im trying to enable "online archive" for the users in a target security group, also i need to set the quota and warning limits. here is the script i am working with. can someone provide assistance as to how to specify the archive size quota and warning limit, and set for all users in the specified security group?

many thanks!

S.
# Instruction to add Quest Powershell Snap-in
Add-PSSnapin quest.ActiveRoles.admanagement
# Move mailboxes by security group 
Write-Host "You have choosen to migrate mailboxes by specifying an AD security group" 
$ADSecGroupName = Read-Host "Enter AD security group that you want to migrate" 
Get-QADUser -MemberOf $ADSecGroupName | ft 
Write-Host "The above list of users will get migrated!!" 
Write-Host " " 
Get-MailboxDatabase | ft 
$TargetDatabaseName = Read-Host "Type the database that you want to migrate user(s) to" 
#  
#Loop through each mailbox 
foreach ($mailbox in (Get-QADUser -MemberOf $ADSecGroupName)) 
{$displayname = $mailbox.Displayname 
Enable-Mailbox $displayname -Archive -TargetDatabase $TargetDatabaseName}

Open in new window

siber1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

siber1Author Commented:
** update - ive modified the script and have this part working - updated below, however how can i set the quota limit and warning?
i believe the switch is: -ProhibitSendQuota

thx in advance.
# Instruction to add Quest Powershell Snap-in
Add-PSSnapin quest.ActiveRoles.admanagement
# Move mailboxes by security group 
Write-Host "You have choosen to migrate mailboxes by specifying an AD security group" 
$ADSecGroupName = Read-Host "Enter AD security group that you want to migrate" 
Get-QADUser -MemberOf $ADSecGroupName | ft 
Write-Host "The above user will have online archive enabled!!" 
Write-Host " " 
Get-MailboxDatabase | ft 
$ArchiveDatabaseName = Read-Host "Please select the target Archive database" 
#  
#Loop through each mailbox 
foreach ($mailbox in (Get-QADUser -MemberOf $ADSecGroupName)) 
{$displayname = $mailbox.Displayname 
Enable-Mailbox $displayname -Archive -ArchiveDatabase $ArchiveDatabaseName}

Open in new window

0
Bryan ButlerCommented:
Please clarify that you wanting to check the archive size against your predefined quota/limit.  Or are you saying it's a matter of checking the disk space?
0
siber1Author Commented:
Hello, i am wanted to set the quota limit and quota warning limit on the "online archive" for each user in the security group.
I have the above script working to enable all users in the security group for online archive, however i need also to set the limits for each of the users in the group.

many thanks!
0
Top Threats of Q1 & How to Defend Against Them

WEBINAR: Join WatchGuard CTO and our Threat Research Team on Aug. 2nd to hear the findings from our Q1 Internet Security Report! Learn more about the top threats detected in the first quarter and how you can defend your business against them!

AkhaterCommented:
here you go


# Instruction to add Quest Powershell Snap-in
Add-PSSnapin quest.ActiveRoles.admanagement
# Move mailboxes by security group 
Write-Host "You have choosen to migrate mailboxes by specifying an AD security group" 
$ADSecGroupName = Read-Host "Enter AD security group that you want to migrate" 
Get-QADUser -MemberOf $ADSecGroupName | ft 
Write-Host "The above user will have online archive enabled!!" 
Write-Host " " 
Get-MailboxDatabase | ft 
$ArchiveDatabaseName = Read-Host "Please select the target Archive database" 
#  
#Loop through each mailbox 
foreach ($mailbox in (Get-QADUser -MemberOf $ADSecGroupName)) 
{$displayname = $mailbox.Displayname 
Enable-Mailbox $displayname -Archive -ArchiveDatabase $ArchiveDatabaseName
Set-Mailbox –identity $displayname  –ArchiveQuota 1GB –ArchiveWarningQuota 900MB
}

Open in new window

0
AkhaterCommented:
for clarification, I just added

Set-Mailbox –identity $displayname  –ArchiveQuota 1GB –ArchiveWarningQuota 900MB

to the script since you said the rest was working
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bryan ButlerCommented:
Akhater has it if you're wanting the predefined limits.  
0
siber1Author Commented:
excellent. thats just what i was looking for. thanks Akhater!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.