Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Script to remove quota for user Mailbox

$
0
0

Hello All,

I am new to Powershell scripting and need help in completing a code which I am writing to remove the Quota set for the users before moving them to Exchange 2010.

Currently the users are in Exchange 2003 and below are my requirment. In my Exchange orgnaizations there are few users for whom specific quota is set manually which i need to track in this script.

Requirements:-

01. I need to remove the quota set on the user mailbox but before removing them I need to log what is the quota set for the user for my audit purpose later on.

So in my script I have written a cmd which will get the information if the user mailbox quota has been set to default quota or not. Below is the cmd

quotasetting=(Get-Mailbox -Identity ""$mail"" -DomainController ""$DOMAINCONTROLLER"" | ft UseDatabaseQuotaDefaults)"

The result of the above cmd is true for users who will use DefaultDatabaseQuota.

How can I use the result of above script to get the information of quota?

If the above result is true then, I will have to get the quota information by querying the Database if the result in false i need to query directly the database for the results.

Thanks in advance for the help.

Best Regards,

Nagaraj N


Nagaraj N


Viewing all articles
Browse latest Browse all 7132

Trending Articles