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