Exchange receive connectors add IP addresses

When we need to add IP address to existing Receive Connector we can add it using Exchange Management Console in Server Configuration, Hub Transport.

This solution is fast when you need to add few IP addresses.
But if you need to add many IP addresses then better option is to use Exchange Management Console and Powershell

 

To get list of Receive Connectors we can run command:

Get-ReceiveConnector

We will get list of all Receive Connectors available on all HUB Transport Exchange Servers.

If we want to list Receive Connectors available on specified server then we need to add parameter -server like below:

Get-ReceiveConnector -server ServerName

 

Now we have list of Receive Connectors, we need to check Identity from this list to use it to get list of all IP addresses assigned to Receive Connector.

Run following command to get all IP addresses from Receive Connector:

(Get-ReceiveConnector -identity "servername\receiveconnector_name").RemoteIPRanges

Continue reading

Print Friendly

Exchange 2010 get list of mailboxes with logon time information

Below you can find script which will return all mailboxes where LastLogonTime is older than 90 days ago.

You can easly set this date in variable $days.

 

Function New-Array {,$args}
$Report = New-Array

$days = "90"

$date_last = (Get-Date).AddDays(-$days) 
$mailboxes = Get-Mailbox -server mxmbx01 -ResultSize unlimited

foreach($mailbox in $mailboxes) 
{ 
  $mbx_DN = $mailbox.DistinguishedName 
  $email = $mailbox.PrimarySmtpAddress.toString()
  $Stat = Get-MailboxStatistics -Identity $mbx_DN | Where-Object {$_.lastLogonTime -lt $date_last} | Select-Object DisplayName, totalitemsize,LastLogonTime

 if ($Stat){
  $tmp = New-Object System.Object
  $tmp | Add-Member -type NoteProperty -name DisplayName -value $($stat.DisplayName)
  $tmp | Add-Member -type NoteProperty -name Email -value $email
  $tmp | Add-Member -type NoteProperty -name TotalSize_MB -value $($stat.TotalitemSize.value.ToMB())
  $tmp | Add-Member -type NoteProperty -name LastLogon -value $($stat.LastLogonTime)
  $Report += $tmp
 }
}
$Report | Export-Csv D:\Scripts\lastlogon_report.csv

 

As a result of this script, you will get .csv file, with informations DisplayName, email address, size of mailbox in MB, and last logon time.

 

 

Print Friendly

Distribution Groups nested – get list only groups

Recently, we described how to obtain a list of all mailboxes in the group that has nested distribution groups.

Unfortunately, using this method, you can not get a list of groups in a distribution group, only users (mailboxes).

To obtain this list, you need to write more or less complicated powershell script or use the additive Quest Powershell Module for Active Directory.

 

After installation of Quest Module, run powershell console and run:

add-PSSnapin quest.activeroles.admanagement

Continue reading

Print Friendly

Get distribution group all members – nested

How can we get a list of mailboxes belonging to a distribution group?
In a simple way, by using the EMC console and check who is a member of a group, or by using powershell EMS console and use the command:

Get-DistributionGroupMember Test_Group

 

In this way we get a list of objects in the group, both mailboxes, contacts, and other groups.

And here there is a problem, because if the distribution group includes the next distribution group, and this again next etc, how can we get a list of all people who receive an email after sending a message to a distribution group?

Unfortunately, using only the Get-DistributionGroupMember we won’t get such information.

This command returns only the objects directly in a group, without nesting.

In this case, we have to use PowerShell commands for Active Directory available.

To do this run EMS console and import the Active Directory module command as follows:

import-module ActiveDirectory

Continue reading

Print Friendly

Recoverable Items Audits, CalendarVersionStoreDisabled, Versions, Deletions and other problems

When we have problems with TotalDeletedItemsSize (too large) we should check all items in Recoverable Items folder and subfolders.

To do this we should use following command:

Get-MailboxFolderStatistics -Identity JSmith -FolderScope RecoverableItems | Format-Table Name,FolderPath,ItemsInFolder,FolderAndSubfolderSize

 

As a result we will get list of all Recoverable Items subfolders and information how much space they use.

RecoverableItems

 

How to remove all items from Deletions we wrote in article:

 Exchange 2010 Database size growing problem

 

 

In general, type the following command and Recoverable Items folder size should be significantly reduced:

Search-Mailbox -Identity JSmith -SearchDumpsterOnly -DeleteContent

Print Friendly

Exchange 2010 list connections to OWA

If you want to get to know how your users are using OWA to connect to mailboxes you can use following two solutions.

In any environment where Microsoft Exchange OWA service is enabled for user mailboxes, we can check how many users actually use OWA access through their mailboxes.

The first solution presents how to check the number of current connections to the mailbox using OWA.

For this purpose, we need to run this script by calling the Get-CASActiveUsers for all servers that provide OWA connections, so mostly for all CAS servers.

 

Following script will list all current connections to OWA and RPC on CAS servers:

 

Continue reading

Print Friendly

Exchange 2010 Service Pack 3 OWA and Outlook Anywhere error HTTP 440 – 440 response was received from Unknown

After installation of Service Pack 3 for Microsoft Exchange 2010 some of you can expirience problem with remote connectivity to Microsoft Exchange.

When you run OWA or Outlook Anywhere you can get error like below:

HTTP 440 – 440 response was received from Unknown

 

You will see this problem on CAS servers where you have enabled HTTP Redirection in IIS on Exchange web sub directories like:

  • OWA,
  • RPC,
  • EWS,
  • Autodiscover

Continue reading

Print Friendly

Unable to soft delete messages after installing Exchange 2010 SP2 RU6 or SP3

Finally, Microsoft has confirmed that what we wrote and many users wrote on the forums.

Namely, Microsoft admits that after installing Rollup 6 for Exchange 2010 SP2 or after the installation of Service Pack 3 for Microsoft Exchange 2010, there are problems with the removing some of e-mails using soft delete:

  1. Unable to soft delete messages that contain voice mail attachments.
  2. Unable to soft delete messages sent from FAX server, printer or scanner which have attachments (such as .PDF).
  3. issue occurs when you use Microsoft Outlook in Online mode or OWA

 

This issue does not happen with messages sent by a user instead of an application, or plain messages without attachments.

As workaround Microsoft recommends:

  1. Hard delete the message instead of soft deleting – to hard delete email using Microsoft Outlook, select the message and then press SHIFT+DELETE to delete it
  2. Use cached mode for Outlook – when using the cached mode of Outlook, the message can be soft deleted

 

All article is available here:

Unable to soft delete some messages after installing Exchange 2010 SP2 RU6 or SP3

 

 

 

Print Friendly

Microsoft Exchange get sent emails list – messagetrackinglog

emailRecently we wrote about how to find all the all recipients of the email:

Exchange MessageTrackingLogs get recipients list

 

 

Now we will present a powershell script that will help us generate statistics of sent emails.

 

However, we are not interested in the amount of all outgoing e-mails, their size, but we will focus on emails sent outside of our Exchange organization and get information about the addresses from which they were sent, with which the subject, how many of these emails and how many recipients receive those emails.

This script allows you to obtain information about the senders e-mail addresses that send many messages out.
This script is based on checking the Transport Logs located on Exchange servers with the Hub Transport roles.

After receiving the results of the script you can use the script in the previous post and find out to whom the message was sent, then you will get list of all recipients of this email.

 

Below we explain how this script work.:

First script part conatins:

  • powershell object definitions
  • paths to output files with emails statistic
  • settings to send email with alert to admin
  • $MAX_Recipients – number of recipients which define when to generate alert sent by email

 

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
Set-AdServerSettings -ViewEntireForest $True

Function New-Array {,$args}

$Report = New-Array
$Report_SMTP = New-Array
$Rep_sum = New-Array
$Rep_SMTP_sum = New-Array

$data = $($((get-date).adddays(-1)).ToString('yyyy.MM.dd'))

#paths to output files
$Out_Rep_file = "d:\Scripts\Logs\Stats\msg_stat_out_$data.csv"
$Out_Rep_sum_file = "d:\Scripts\Logs\Stats\msg_stat_out_sum_$data.csv"

#files with emails with smtp traffic
$Out_Rep_SMTP_file = "d:\Scripts\Logs\Stats\msg_stat_smtp_out_$data.csv"
$Out_Rep_SMTP_sum_file = "d:\Scripts\Logs\Stats\msg_stat_smtp_out_sum_$data.csv"
#file with report attached to email (emails recipients grater than $MAX_Recipients)
$Email_HTML_File = "d:\Scripts\Logs\Stats\Report_outgoing_emails_$data.htm"

#settings for email with report
$mail_from = "exchangereport@domain.com"
$mail_to = "admin@domain.com"
$mail_smtp_host = "smtpserver.domain.local"
$mail_subject = "Report outgoing emails $data"

#variable that defines the threshold for recipients to write to email report
$MAX_Recipients = 100

Continue reading

Print Friendly

Exchange MessageTrackingLogs get recipients list

From time to time we need to get a list of all persons to whom the email was sent with a given subject.

The list of recipients in a fairly simple way we can get from the transaction logs which are located on Exchange servers with HT roles.

Of course, before you do this, you have to configure your environment so that the transaction logs are kept for a few days on the servers.

The following script returns a list of recipients to whom the email was sent with the subject “Test mail”, but we are interested in the time of dispatch of the last day.

Number of days is defined in $DAYS and subject in $SUBJECT.

Script you can find below:

Continue reading

Print Friendly