23 May 2013

Set mailboxes to usedatabasequotadefaults for multiple users

Get-Mailbox -resultsize unlimited | where {$_.usedatabasequotadefaults -ne $true} | fl alias | out-file "d:\temp\users.csv"

Edit the csv file so that there are no empty lines and and empty spaces after the users alias.
Must look something like this:

alias
alias1
alias2
alias3
alias4

Import-Csv "d:\temp\users.csv" | foreach {Set-Mailbox -identity $_.alias -UseDatabaseQuotaDefaults $true}

Check to see the result;
import-csv "d:\temp\users.csv" | foreach {Get-Mailbox -identity $_.alias} | fl usedatabasequotadefaults,alias

No comments:

Post a Comment