Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Quota script

2 views
Skip to first unread message

Karl Mitschke

unread,
Jan 5, 2010, 10:34:26 AM1/5/10
to
Hello macblazer,

> Ok...I've been banging around on this one for a few days. Maybe
> someone can help.
>
> So where I am we have a ton of Exchange 2007 servers (some my site is
> responsible for and some we are not)
>
> All the servers we are responsbile for have the same basic set of
> storage groups and mailstores.
> Such as:
> Cluster1\Regular Users Storage Group 1\Regular Users 1
> What I'm trying to do is create a script that I can run that will scan
> through only the databases on the servers we are responsbile for and
> only pull the users where UseDatabaseQuotaDefaults is equal to FALSE
> and then pass that all to a command to reset those users so that they
> use the default database quotas.
>
> get-mailbox -results unlimited -Database "cluster1\Regular Users
> Storage Group 1\Regular Users 1" | Where {$_.UseDatabaseQuotaDefaults
> -eq $false}
>
> works for getting me the list of users, but now I'm trying to figure
> out how to reformat that output in such a way that it can be sent to
> another command to do the work of resetting their
> UseDatabaseQuotaDefaults flag.
>
> Any ideas would be greatly appreciated.
>
> Dale
>

Dale;

This might work: (All one line)

Get-Mailbox -Filter {UseDatabaseQuotaDefaults -eq $false -AND database -eq
"<database DN>"} |Select-Object Alias |Set-Mailbox -UseDatabaseQuotaDefaults:$true


If not, try this:

Get-Mailbox -Filter {UseDatabaseQuotaDefaults -eq $false -AND database -eq
"<database DN>"} |Select-Object Alias |Set-Mailbox -UseDatabaseQuotaDefaults
= $true

Karl
http://unlockpowershell.wordpress.com/


0 new messages