I have CSV file with 19 users with different mailbox Quota, I want to be able to add 200mb more to their current mailbox size. if I tried set-mailbox it will change their current size and they all will have same mailbox quota which I dont want!! I only want to add 200MB to their current size.
$list = import-csv c:\list.csv
foreach ($user in $list) {set-mailbox -identity $user.user -UseDatabaseQuotaDefaults $false -IssueWarningQuota 200MB -ProhibitSendQuota 250MB -ProhibitSendReceiveQuota 280MB}
To find mailbox quota script
$List = Import-Csv C:\temp\Users_size.csv
foreach ($user in $List){
Get-Mailbox $user.user_id | fl name, *Quota | Out-File -Append c:\size.csv
Get-MailboxStatistics $user.user_id | fl TotalItemSize | Out-File -Append c:\size.csv}
You just need to add
200MBto the current quota-values inside the foreach-loop so the new value is unique for each user in the loop. I have no idea how your csv look like, so I created a sample-csv.I don't have an Exchange-environment so this is all untested code
list.csv
Sample:
If your csv doesn't contain the current quota-values, you could use
Get-MailBoxto get them.