Quantcast
Channel: Exchange Server 2013 - General Discussion forum
Viewing all articles
Browse latest Browse all 13303

Set mailbox quota multiple users Exchange 2013 using Powershell

$
0
0

Hey Everyone - 

I have been working on trying to use a csv file that contain names of users to set mailbox quotas. This below script doesn't work and returns the following error:

$data = import-csv C:\scripts\Quota.csv

foreach($i in $data)
  {
    $alias = $i;

    Set-Mailbox -id $alias -IssueWarningQuota 3.5gb -ProhibitSendQuota 3.7gb -ProhibitSendReceiveQuota unlimited -UseDatabaseQuotaDefaults $false

  }

****Error****

Cannot process argument transformation on parameter 'Identity'. Cannot convert value

This below one works just fine. What am I missing with using a csv file.

$data = get-content -Path C:\scripts\Quota.txt

foreach($i in $data)
  {
    $alias = $i;

    Set-Mailbox -id $alias -IssueWarningQuota 2.7gb -ProhibitSendQuota 2.8gb -ProhibitSendReceiveQuota unlimited -UseDatabaseQuotaDefaults $false

  }

Thanks for any help


Viewing all articles
Browse latest Browse all 13303

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>