Search this Blog

Tuesday, December 22, 2015

Exchange PowerShell Commands

Exchange Powershell command to get the details of a mailbox

[PS] C:\Users\sysadmin\Desktop>Get-Mailbox -Identity "Nagarajan S" | For
mat-List Name,Database,UseDatabaseQuotaDefaults,IssueWarningQuota,ProhibitSendRe
ceiveQuota,MaxSendSize,MaxReceiveSize,RecipientLimits,PrimarySmtpAddress,Organiz
ationalUnit,RecipientType,ServerName


Command to get Mail Forwarding Enabled Users

Get-Mailbox -Filter {ForwardingAddress -ne $null} | ft Name,ForwardingAddress,DeliverToMailboxAndForward -Autosize


Forefront Powershell command to get blocked email of a user

PS C:\Program Files (x86)\Microsoft Forefront Protection for Exchange Server>Get-FseQuarantine | Where-Object {$_.RecipientAddresses -eq "s.nagarajan@testdomain.com"} | Select-object -property "SenderName","SenderAddress","Subject","DetectionTime","IncidentCategory","IncidentName","RecipientNames" 


To get the mailbox size of the users in an OU

get-mailbox -OrganizationalUnit "ou=IT,ou=Users,dc=testdomain,dc=net" -resultsize unlimited | get-mailboxstatistics | ft DisplayName,TotalItemSize,Itemcount


Setting mail enabled security group to restrict mail delivery to DL

Set-DistributionGroup Test-ChennaiDL -AcceptMessagesOnlyFromDLMembers "ALL_MAIL SENDERS" 


No comments:

Post a Comment