Monday, June 24, 2013

Services installed by Exchange Setup


 

Service name Service short nameSecurity context Description and dependenciesDefault startup type Server rolesRequired (R) or optional (O)

Microsoft Exchange Active Directory Topology

MSExchangeADTopology

Local System

Provides Active Directory topology information to Exchange services. If this service is stopped, most Exchange services are unable to start. This service has no dependencies.

Automatic

Mailbox, Hub Transport, Client Access, Unified Messaging

R

Microsoft Exchange ADAM

ADAM_MSExchange

Network Service

Stores configuration data and recipient data on the Edge Transport server. This service represents the named instance of Active Directory Lightweight Directory Service (AD LDS) that's automatically created by Setup during Edge Transport server installation. This service is dependent upon the COM+ Event System service.

Automatic

Edge Transport

R

Microsoft Exchange Address Book

MSExchangeAB

Local System

Manages client address book connections. This service is dependent upon the Microsoft Exchange Active Directory Topology service.

Automatic

Client Access

R

Microsoft Exchange Anti-spam Update

MSExchangeAntispamUpdate

Local System

Provides the Microsoft Forefront Protection 2010 for Exchange Server anti-spam update service. On Hub Transport servers, this service is dependent upon the Microsoft Exchange Active Directory Topology service. On Edge Transport servers, this service is dependent upon the Microsoft Exchange ADAM service.

Automatic

Hub Transport, Edge Transport

O

Microsoft Exchange Credential Service

MSExchangeEdgeCredential

Local System

Monitors credential changes in AD LDS and installs the changes on the Edge Transport server. This service is dependent upon the Microsoft Exchange ADAM service.

Automatic

Edge Transport

R

Microsoft Exchange EdgeSync

MSExchangeEdgeSync

Local System

Connects to an AD LDS instance on subscribed Edge Transport servers over a secure LDAP channel to synchronize data between a Hub Transport server and an Edge Transport server. This service is dependent upon the Microsoft Exchange Active Directory Topology service. If Edge Subscription isn't configured, this service can be disabled.

Automatic

Hub Transport

O

Microsoft Exchange File Distribution

MSExchangeFDS

Local System

Distributes offline address book (OAB) and custom Unified Messaging prompts. This service is dependent upon the Microsoft Exchange Active Directory Topology and Workstation services.

Automatic

Client Access, Unified Messaging

R

Microsoft Exchange Forms-Based Authentication

MSExchangeFBA

Local System

Provides forms-based authentication to Microsoft Office Outlook Web App and the Exchange Control Panel. If this service is stopped, Outlook Web App and the Exchange Control Panel won't authenticate users. This service has no dependencies.

Automatic

Client Access

R

Microsoft Exchange IMAP4

MSExchangeIMAP4

Network Service

Provides IMAP4 service to clients. If this service is stopped, clients won't be able to connect to this computer using the IMAP4 protocol. This service is dependent upon the Microsoft Exchange Active Directory Topology service.

Manual

Client Access

O

Microsoft Exchange Information Store

MSExchangeIS

Local System

Manages the Exchange Information Store. This includes mailbox databases and public folder databases. If this service is stopped, mailbox databases and public folder databases on this computer are unavailable. If this service is disabled, any services that explicitly depend on it will fail to start. This service is dependent on the RPC, Server, Windows Event Log, and Workstation services.

Automatic

Mailbox

R

Microsoft Exchange Mail Submission Service

MSExchangeMailSubmission

Local System

Submits messages from the Mailbox server to Exchange 2010 Hub Transport servers. This service is dependent upon the Microsoft Exchange Active Directory Topology service.

Automatic

Mailbox

R

Microsoft Exchange Mailbox Assistants

MSExchangeMailboxAssistants

Local System

Performs background processing of mailboxes in the Exchange store. This service is dependent upon the Microsoft Exchange Active Directory Topology service.

Automatic

Mailbox

R

Microsoft Exchange Mailbox Replication Service

MSExchangeMailboxReplication

Local System

Processes mailbox moves and move requests. This service is dependent upon the Microsoft Exchange Active Directory Topology and Net.Tcp Port Sharing service.

Automatic

Client Access

O

Microsoft Exchange Monitoring

MSExchangeMonitoring

Local System

Allows applications to call the Exchange diagnostic cmdlets. This service has no dependencies.

Manual

All

O

Microsoft Exchange POP3

MSExchangePOP3

Network Service

Provides POP3 service to clients. If this service is stopped, clients can't connect to this computer using the POP3 protocol. This service is dependent upon the Microsoft Exchange Active Directory Topology service.

Manual

Client Access

O

Microsoft Exchange Protected Service Host

MSExchangeProtectedServiceHost

Local System

Provides a host for several Exchange services that must be protected from other services. This service is dependent upon the Microsoft Exchange Active Directory Topology service.

Automatic

Hub Transport, Client Access

R

Microsoft Exchange Replication Service

MSExchangeRepl

Local System

Provides replication functionality for mailbox databases on Mailbox servers in a database availability group (DAG) and database mount functionality for all Mailbox servers. This service is dependent upon the Microsoft Exchange Active Directory Topology service.

Automatic

Mailbox

R

Microsoft Exchange RPC Client Access

MSExchangeRPC

Network Service

Manages client RPC connections for Exchange. This service is dependent upon the Microsoft Exchange Active Directory Topology service.

Automatic

Mailbox, Client Access

O (Mailbox), R (Client Access)

Microsoft Exchange Search Indexer

MSExchangeSearch

Local System

Drives indexing of mailbox content, which improves the performance of content search. This service is dependent upon the Microsoft Exchange Active Directory Topology and Microsoft Search (Exchange Server) services.

Automatic

Mailbox

O

Microsoft Exchange Server Extension for Windows Server Backup

WSBExchange

Local System

Enables Windows Server Backup users to back up and recover application data for Microsoft Exchange. This service has no dependencies.

Manual

Mailbox

O

Microsoft Exchange Service Host

MSExchangeServiceHost

Local System

Provides a host for several Exchange services. On internal server roles, this service is dependent upon the Microsoft Exchange Active Directory Topology service. On Edge Transport servers, this service is dependent upon the Microsoft Exchange ADAM service.

Automatic

All

R

Microsoft Exchange Speech Engine

MSSpeechService

Network Service

Provides speech processing services for Unified Messaging. This service is dependent upon the Windows Management Instrumentation (WMI) service.

Automatic

Unified Messaging

R

Microsoft Exchange System Attendant

MSExchangeSA

Local System

Forwards directory lookups to a global catalog server for legacy Outlook clients, generates e-mail addresses and OABs, updates free/busy information for legacy clients, and maintains permissions and group memberships for the server. If this service is disabled, any services that explicitly depend on it will fail to start. This service is dependent on the RPC, Server, Windows Event Log, and Workstation services.

Automatic

Mailbox

R

Microsoft Exchange Throttling

MSExchangeThrottling

Network Service

Limits the rate of user operations. This service is dependent upon the Microsoft Exchange Active Directory Topology service.

Automatic

Mailbox

R

Microsoft Exchange Transport

MSExchangeTransport

Network Service

Provides SMTP server and transport stack. On Hub Transport servers, this service is dependent upon the Microsoft Exchange Active Directory Topology service. On Edge Transport servers, this service is dependent upon the Microsoft Exchange ADAM service.

Automatic

Hub Transport, Edge Transport

R

Microsoft Exchange Transport Log Search

MSExchangeTransportLogSearch

Local System

Provides remote search capability for Microsoft Exchange Transport log files. On Hub Transport servers, this service is dependent upon the Microsoft Exchange Active Directory Topology service. On Edge Transport servers, this service is dependent upon the Microsoft Exchange ADAM service.

Automatic

Hub Transport, Mailbox, Edge Transport

O

Microsoft Exchange Unified Messaging

MSExchangeUM

Local System

Enables Microsoft Exchange Unified Messaging features. This allows voice and fax messages to be stored in Exchange and gives users telephone access to e-mail, voice mail, calendar, contacts, or an auto attendant. If this service is stopped, Unified Messaging isn't available. This service is dependent upon the Microsoft Exchange Active Directory Topology and the Microsoft Exchange Speech Engine service.

Automatic

Unified Messaging

R

Microsoft Search (Exchange Server)

msftesql-Exchange

Local System

This is a Microsoft Exchange-customized version of Microsoft Search. This service is dependent on the RPC service.

Manual

Hub Transport, Mailbox

O

VSS-based backup

Volume Shadow Copy Service (VSS) is a Windows service for capturing and creating snapshots called shadow copies.  VSS, which operates at the block level of the file system, provides a backup infrastructure for Microsoft operating systems. 

Windows VSS has three major components in addition to the service -- writer, requester and provider. The service sits logically in the center of the other components and handles communication between them.

VSS writer -  Each VSS-aware application installs its own VSS writer to a computer during the initial installation. 

VSS requestor
 -  Any application that needs to quiesce data for capture can play the role of VSS requestor.

VSS provider
 - The provider creates and manage the shadow copies of data on the system. 
 

Here's how VSS works:  The VSS requestor announces that it needs to create a server snapshot. Prior to creating that snapshot, it queries the server to determine which VSS writers have been installed. (It needs this list so it can later instruct each writer to quiesce its associated application).  Then, the VSS requestor instructs each VSS writer to accomplish whichever task is needed for data quiescence. After each VSS writer reports that it has completed pre-backup tasks, the VSS requestor instructs the VSS provider to create a snapshot. The provider tells the requestor where to go to locate the data it needs and the backup begins. When the VM backup is complete, the VSS requestor announces that it has completed its activities. This announcement instructs each VSS writer to perform any post-backup tasks necessary so the computer and its applications can return to regular operation.


http://searchdatabackup.techtarget.com/definition/VSS-based-backup

Description of Full, Incremental, and Differential Backups

Full Backup (or Reference Backup)

When you set the Backup Type setting to Full, all the files and folders on the drive are backed up every time you use that file set. To set the backup type, click Options on the Settings menu, and then click the Backup tab. 

Example:
  1. In Backup, click the drives, files, or folders to back up, and then click Next Step.
  2. Click the destination (where you want the files backed up to).
  3. On the Settings menu, click Options, click the Backup tab, click "Full: backup of all selected files," and then click OK.
  4. On the File menu, click Save As and name your backup set. Once saved, click Start Backup.
  5. Provide a name for the selected drive, files, or folders in the Backup Set Label dialog box, and then click OK.
Advantages:
  • All files from the selected drives and folders are backed up to one backup set.
  • In the event you need to restore files, they are easily restored from the single backup set.
Disadvantages:
  • A full backup is more time consuming than other backup options.
  • Full backups require more disk, tape, or network drive space.

Incremental Backup

An incremental backup provides a backup of files that have changed or are new since the last incremental backup. To start the process, a file set with the incremental option selected is used to perform a backup. You can select the backup type by clicking Options on the Settings menu, and then clicking the Backup tab. 

For the first incremental backup, all files in the file set are backed up (just as in a full backup). If you use the same file set to perform a incremental backup later, only the files that have changed are backed up. If you use the same file set for a third backup, only the files that have changed since the second backup are backed up, and so on. 

In Backup, you can select files and/or folders to be backed up. If you select a folder, all the files and folders within that folder are selected. In an incremental backup, if you select a folder, files that are added to the folder are included during the next backup. If you select specific files, files that are added to the folder are not included during the next backup. 

Example:
Monday - Perform the first incremental backup of selected files and/or           folders using a file set with the Incremental option enabled.    Tuesday - Perform another backup with the backup file set you created            Monday. Only files that have changed since Monday's backup are            backed up.    Wednesday - Perform another backup with the backup file set you created              Monday. Only files that have changed since Tuesday's              incremental backup are backed up.  				
To reset a file set so that the next backup backs up all files, and not just files that are new or have changed, follow these steps:
  1. On the File menu, click Open File Set. Click the file set you want to use, and then click Open. Click Next Step.
  2. Click the destination (where you want the files backed up to).
  3. On the Settings menu, click Options, click the Backup tab, click "Full: backup of all selected files," and then click OK.
  4. On the File menu, click Save to save your backup set.
  5. Repeat steps 1 and 2.
  6. On the Settings menu, click Options, click the Backup tab, click "Incremental: backup of selected files that have changed since the last full backup," and then click OK.
Advantages:
  • Backup time is faster than full backups.
  • Incremental backups require less disk, tape, or network drive space.
  • You can keep several versions of the same files on different backup sets.
Disadvantages:
  • In order to restore all the files, you must have all of the incremental backups available.
  • It may take longer to restore a specific file since you must search more than one backup set to find the latest version of a file.

Differential Backup (Not Supported in Backup)

A differential backup provides a backup of files that have changed since a full backup was performed. A differential backup typically saves only the files that are different or new since the last full backup, but this can vary in different backup programs. Together, a full backup and a differential backup include all the files on your computer, changed and unchanged. 

Example:
Monday - Perform a full backup and save the file set.    Tuesday - Perform a differential backup using the same file set. All files            that have changed since the full backup are backed up in the            differential backup.    Wednesday - Perform a differential backup using the same file set. All the              files that have changed since Monday's full backup are backed              up.  				
Advantages:
  • Differential backups require even less disk, tape, or network drive space than incremental backups.
  • Backup time is faster than full or incremental backups.
Disadvantages:
  • Restoring all your files may take considerably longer since you may have to restore both the last differential and full backup.
  • Restoring an individual file may take longer since you have to locate the file on either the differential or full backup.

Wednesday, June 19, 2013

How to clear old unused distribution lists from Exchange 2010/2007 programatically

Source :   http://ivan.dretvic.com/2011/10/how-to-clear-old-unused-distribution-lists-from-exchange-2010-programatically/

 

We have used below CMDs to provide the DL Status report for IMG Client.

 

Get-DistributionGroup -ResultSize unlimited | Select-Object PrimarySMTPAddress | Sort-Object PrimarySMTPAddress | Export-CSV DL-ALL.csv –notype

 

 

Get-TransportServer | Get-MessageTrackingLog -EventId Expand -ResultSize Unlimited | Sort-Object RelatedRecipientAddress | Group-Object RelatedRecipientAddress | Sort-Object Name | Select-Object @{label="PrimarySmtpAddress";expression={$_.Name}}, Count | Export-CSV DL-Active.csv –notype

 

 

 

$file1 = Import-CSV -Path "DL-ALL.csv"

$file2 = Import-CSV -Path "DL-Active.csv"

Compare-Object $file1 $file2 -Property PrimarySmtpAddress -SyncWindow 500 | Sort-Object PrimarySmtpAddress | Select-Object -Property PrimarySmtpAddress | Export-Csv DL-Inactive.csv –NoType

 

 

 

1. Configuring Exchange MessageTrackingLogs settings

Here are the settings i used to configure my logging on my server, named EXCH1. I decided to increase my logging from 30 days to 90 days based on my own requirements – you may need to go longer.
Notes:

·         Note this is a server specific command and you need to do it to all your transport servers

·         My 300 seat environment used 500MB per month of logs.

·         Increasing the log will not remove the original logs

·         You will have to wait 2 months after setting

·         If you C:\ drive is short on space you can relocate the log path to a different local drive

The following command gets the logging information needed from server EXCH1

1

Get-TransportServer -Identity EXCH1 | fl *messagetracking*

2

MessageTrackingLogEnabled               : True

 

3

MessageTrackingLogMaxAge                : 30.00:00:00

4

MessageTrackingLogMaxDirectorySize      : 1000 MB (1,048,576,000 bytes)

 

5

MessageTrackingLogMaxFileSize           : 10 MB (10,485,760 bytes)

6

MessageTrackingLogPath                  : C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\MessageTracking

 

7

MessageTrackingLogSubjectLoggingEnabled : True

The following command sets the Log Directory size to 3GB

1

Set-TransportServer -Identity EXCH1 -MessageTrackingLogMaxDirectorySize 3000MB

The following command sets the Max Age of logs from 30 days to 90 days

1

Set-TransportServer -Identity EXCH1 -MessageTrackingLogMaxAge 90.00:00:00

The following command gets the updated logging information needed from server EXCH1

1

Get-TransportServer -Identity EXCH1 | fl *messagetracking*

2

MessageTrackingLogEnabled               : True

 

3

MessageTrackingLogMaxAge                : 90.00:00:00

4

MessageTrackingLogMaxDirectorySize      : 2.93 GB (3,145,728,000 bytes)

 

5

MessageTrackingLogMaxFileSize           : 10 MB (10,485,760 bytes)

6

MessageTrackingLogPath                  : C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\MessageTracking

 

7

MessageTrackingLogSubjectLoggingEnabled : True

2. Export list of ALL distribution lists

To export ALL DL's from your environment run the below command. This command will export the primary SMTP address from all DL's and sort them alphabetically, and put them in a CSV file.

1

Get-DistributionGroup | Select-Object PrimarySMTPAddress | Sort-Object PrimarySMTPAddress | Export-CSV DL-ALL.csv -notype

3. Export list of ALL active distribution lists based off Exchange Tracking Logs

To export all active DL's from your server we need to look into the transport logs. We first fetch all event logs relating to the expansion of DL's, then we sort them by RelatedRecipietAddress. Now that they are sorted we group them by RelatedRecipientAddress. From here we sort it alphabetically by the Name column, rename the Name column to PrimarySmtpAddress (so that it matches the column name of the DL-ALL.CSV file, then export the renamed Name column and the Count column to a CSV. Below is a command to do this:

1

Get-MessageTrackingLog -Server EXCH1 -EventId Expand -ResultSize Unlimited | Sort-Object RelatedRecipientAddress | Group-Object RelatedRecipientAddress | Sort-Object Name | Select-Object @{label="PrimarySmtpAddress";expression={$_.Name}}, Count | Export-CSV DL-Active.csv -notype

Note: The count column simply displays how many emails were found being sent to the DL. You can sort that to tell you the most popular/least popular ones in your environment.

4. Compare the results and output the inactive DL's

So initially I compared the output using Excel  and VLookups (Yuk – I know) and then I remembered we can do soo many things in PowerShell! Well here I import two CSV's that we generated previously, compare the two files and output the difference to a new file called DL-Inactive.csv.

1

$file1 = Import-CSV -Path "DL-ALL.csv"

2

$file2 = Import-CSV -Path "DL-Active.csv"

 

3

Compare-Object $file1 $file2 -Property PrimarySmtpAddress -SyncWindow 500 | Sort-Object PrimarySmtpAddress | Select-Object -Property PrimarySmtpAddress | Export-Csv DL-Inactive.csv -NoType

5. Hide all unused DL's from the Global Address List

So now you have a long list of distribution groups and you have confirmed with the business that all those DL's are no longer used. Now you simply run the following command and it will mark all those DL's as hidden. Immediately you have a sense of relief when this is done – you are truly on the path of cleaning up your Exchange environment!

The below scipt imports your now cleaned and checked DL-Inactive.csv file. From here we get each line, add a note saying it is now hidden (with a date) and hide it from the GAL using Set-DistributionGroup cmdlet.

1

$a = Get-Date

2

$notes = "$a - Hidden from address list due to inactive use."

 

3

$inactiveDL = Import-CSV -Path "DL-Inactive2.csv" | foreach-object

4

{

 

5

Set-Group -identity $_.PrimarySmtpAddress -notes $notes

6

Set-DistributionGroup -identity $_.PrimarySmtpAddress -HiddenFromAddressListsEnabled $true

 

7

}

6. Actually delete these Distribution Groups

So time has passed and there are no HelpDesk calls asking for some missing DL's. The cloud has settled and you are prepared to delete the DL's. Well before you go and delete anything you have to remember that these groups (if they are security groups) could be used elsewhere. So because of this, all we are going to do is disable the mail capabilities from that group, and then add a note in their notes field that this was done and when. I recommend using extreme caution!

Below is the code:

1

$a = Get-Date

2

$notes = "$a - No longer Mail Enabled due to inactive use."

 

3

$inactiveDL = Import-CSV -Path "DL-Inactive2.csv" | foreach-object

4

{

 

5

Set-Group -identity $_.PrimarySmtpAddress -notes $notes

6

Disable-DistributionGroup -identity $_.PrimarySmtpAddress -Confirm $false

 

7

}

There you have it. You are now left with a clean list of distribution lists that can be run periodically to determine if more cleaning is required. Your users will love it because all you are left with is up-to-date distribution lists that are current and up to date.
Last point – i have not converted this into one PS script yet, and do all the steps individually. When I do merge it all into the one, i will post it up here.