Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBookV2
Script Library
Twitter Grid
Modules
QuickClick
Scripts
Snippets
Videos
Library
»
Script Library
»
Exchange Server 2007
»
Slideshow
Exchange Server 2007 Slideshow
Share
|
Browse Library
Module Library
QuickClick Library
Script Library
Active Directory
BizTalk
Citrix
Clustering
Desktop
Exchange Server 2003
Exchange Server 2007
File System
Group Policy
Internet Information Server (IIS)
Local Accounts
Logs
Microsoft Office
Microsoft Team Foundation Server
MySQL
Networking
Registry
Remote Desktop Services
Remoting
Security
SharePoint
SQL Server
System Center Virtual Machine Manager
System Center Configuration Manager
System Center Operations Manager
Tutorial
Terminal Server
Using .Net
Virtual Server
VMware
Windows 7
Windows HPC
Windows Server 2000
Windows Server 2003
Windows Server 2008
Windows XP
WMI
Misc
Snippet Library
Video Library
Members Only
Tags
.NET Framework
address list
cluster
database
distribution group
email
email address
Exchange
Exchange 2007
export
filter
get
Get-Queue
mailbox
Mailbox Size
new
pst
Quota
remove
space
statistics
test
tip
user
validity
View more
CheckMailboxQuota
Function
QSearch {
clear
-host
Write-Host
"======================================================================="
-ForegroundColor
Magenta
Write-Host
"
MAILBOX QUOTA INFORMATION FOR: $username
"
-ForegroundColor
Green
Write-Host
"======================================================================="
-ForegroundColor
Magenta
$username
=
read-host
-Prompt
"Enter The User Name for the Mailbox Quota Lookup: "
# Get the mailbox, break if it's not found
$mb
=
Get-Mailbox
$username
-ErrorAction
Stop
# Get the mailbox statistics
$mbstats
=
Get-MailboxStatistics
$username
# If the mailbox is using the database quotas then read them, otherwise read them from the mailbox
If
(
$mb
.
UseDatabaseQuotaDefaults
-eq
$true
) {
clear
-host
Write-Host
"======================================================================="
-ForegroundColor
Magenta
Write-Host
"
MAILBOX QUOTA INFORMATION FOR: $username
"
-ForegroundColor
Green
Write-Host
"======================================================================="
-ForegroundColor
Magenta
Write-Host
"Default Quota Set"
-ForegroundColor
Green
}
else
{
$PSQuota
=
(
Get-MailboxDatabase
-Identity
$mb
.
Database
).
ProhibitSendQuota.Value.ToMB
()
$PSRQuota
=
(
Get-MailboxDatabase
-Identity
$mb
.
Database
).
ProhibitSendReceiveQuota.Value.ToMB
()
$WQuota
=
(
Get-MailboxDatabase
-Identity
$mb
.
Database
).
issuewarningQuota.Value.ToMB
()
$size
=
$mbstats
.
TotalItemSize.Value.ToMB
()
clear
-host
Write-Host
"======================================================================="
-ForegroundColor
Magenta
Write-Host
"
MAILBOX QUOTA INFORMATION FOR: $username
"
-ForegroundColor
Green
Write-Host
"======================================================================="
-ForegroundColor
Magenta
Write-Host
""
Write-Host
"Mailbox Of:
"
$mb
.
DisplayName
-ForegroundColor
Green
Write-Host
"Mailbox Size (MB):
"
$size
-ForegroundColor
Green
Write-Host
"mailbox Issue Warning Quota (MB):
"
$WQuota
-ForegroundColor
Green
Write-Host
"mailbox Prohibit Send Quota (MB):
"
$PSQuota
-ForegroundColor
Green
Write-Host
"mailbox Prohibit Send & Recieve Quota (MB):"
$PSRQuota
-ForegroundColor
Green
Write-Host
""
Write-Host
"======================================================================="
-ForegroundColor
Magenta
Write-Host
""
}
}
Function
Again{
$Again
=
read-host
-Prompt
"Would you like to perform another Mailbox Quota Lookup? (Y)es or Anykey to Exit: "
If
(
$Again
-eq
"Y"
){
QSearch
Again
}
Else
{
Exit
}
}
QSearch
Again
Loading...
CheckMailboxQuota
Powershell...
Powershell...
Powershell...
Create Contacts...
Script to Check...
Test-Connecton...
Powershell...
Powershell...
Powershell...
View all files
Copyright 2011 PowerShell.com. All rights reserved.