Exchange 2010 CAS RPC & OWA active connections

Sometimes you want to know how many users connect do your Exchange 2010 Client Access Servers. This information is useful then you are using Network Load Balancer or Hardware Load Balancer.
Then you can easily check if it works perfectly.

Information about users connections to specified CAS server you can get from Counters:

  •  MSExchange RpcClientAccess\User Count
  • MSExchange OWA\Current Unique Users

 

You can get value of those counters using Exchange Management Shell and paste following powershell code:

 

$CASServers = Get-ClientAccessServer | select name

Foreach ($srv in $CASServers){
 $RPC = Get-Counter "\MSExchange RpcClientAccess\User Count" -ComputerName $srv.name
 $OWA = Get-Counter "\MSExchange OWA\Current Unique Users" -ComputerName $srv.name
 New-Object PSObject -Property @{
 Server = $srv.name
 "RPC Client Access" = $RPC.CounterSamples[0].CookedValue
 "Outlook Web App" = $OWA.CounterSamples[0].CookedValue
 }
}

 

You only need to have access to all CAS servers, then you will get result like below:

 

CAS_statistics

 

 

Exchange 2010 Server Role Requirements Calculator v20.8

Few days ago we wrote about new version of Exchange 2010 Server Role Requirements Calculator which has fixed CAS and HT memory calculations formulas to not report #NAME when designing site resilient topologie.

Now we have new version, on 06/07/2013 Exchange 2010 Server Role Requirements Calculator version 20.8

This version has fixed an error with secondary CAS CPU calculations.

Exchange 2010 Server Role Requirements Calculator v20.8 can be downloaded here:

Exchange 2010 Server Role Requirements Calculator v20.8

 

and list of changes can be found here:

Updates to the Exchange 2010 Server Role Requirements Calculator

 

Exchange 2010 Administrator Audit Log – search logs

We wrote how to enable Administrator Audit Log on Exchange 2010 in last post:

Exchange 2010 Administrator Audit Log – configuration

 

Now we want to explain how can we search logs or export them.

 

We can see logs and export them using:

  • ECP console
  • CMDlet Search-AdminAuditLog or New-AdminAuditLogSearch

 

Using ECP console to search and export logs:

Run ECP console and choose:

  1. In the drop-down list box next to Mail > Options, click My Organization from the Select what to manage list.
  2. Click Reporting, click Auditing, and then click Export Configuration Changes.
  3. Select a date range using the Start Date and End Date fields.
  4. Select the recipient who should receive the XML file using the Select users to email the audit log to field.
  5. Click Export.

Continue reading

Exchange 2010 Administrator Audit Log – configuration

audit

If your Exchange organization has more than one administrators, and sometimes you need to know who did what, then you should use Exchange Administrator Audit Log.

When you enable Administrator Audit Log it will help you to keep a track of the changes made to any Exchange configuration like:

creating new mailbox, changing receive connectors, transport rules etc.

 

Those information are quite important during troubleshooting your Exchange environment.

In Microsoft Exchange 2010 RTM, Administrator Audit Log logged all operations to mailbox. When you enable audit log then you need to use parameter AdminAuditLogMailbox to specify mailbox to store all audit logs.

But with SP1 for Exchange 2010 you don’t need to use mailbox anymore.

Now all logs are stored in a hidden, dedicated arbitration mailbox.

 

To check if Administrator Audit Log is enabled we should use following command:

Get-AdminAuditLogConfig | FL

 

we will receive information about audit settings like below:

Continue reading

Exchange 2010 Server Role Requirements Calculator v20.7

Last time we wrote about new requirements calculator for Exchange 2013 and also for Exchange 2010.

Unfortunately Exchange 2010 Requirements Calculator in version 20.6 has some problems with memory calculations formulas when designing site resilient topologies for CAS or HT.

So now we have new version of Exchange 2010 Requirements Calculator v20.7

New version can be downloaded here:

Exchange 2010 Server Requirements Calculator v20.7

To see what’s new in this version go to:

Updates to the Exchange 2010 Server Role Requirements Calculator

 

 

Update Rollup 1 for Exchange Server 2010 Service Pack 3 KB2803727

The Exchange Team released Rollup 1 for Exchange 2010 SP3.

After installation of Rollup 1 you will get version 14.3.146.0

Rollup 1 for Exchange 2010 SP3 is available for download from:

Update Rollup 1 for Exchange Server 2010 Service Pack 3 (KB2803727)

 

Ex2010SP3RU1

 

 

Full details for this release you can find here:

Description of Update Rollup 1 for Exchange Server 2010 Service Pack 3

Issues resolved by Rollup 1:

Continue reading

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

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.

 

 

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

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