Viewing Queues
View queue on server;
Get-Queue
Messages on queue;
Get-Queue | Get-Message
view queue on specified server
Get-Queue -Server serveradı
view queue on all transport servers
Get-TransportServer | Get-Queue
Message on the all transport servers queue
Get-TransportServer | Get-Queue | Get-Message
Suspending all the messages on queue
Get-Queue | Get-Message | Suspend-Message
Deleting messages on queue
Get-Queue | Get-Message | Remove-Message
Search This Blog
Showing posts with label Exchange. Show all posts
Showing posts with label Exchange. Show all posts
Friday, 28 June 2013
Wednesday, 13 February 2013
Using Powershell to delete email in Exchange 2010
This can be used to find/delete one email or thousands of emails. A few weeks after the above happened, an automated alerting system went nuts and sent out about 80,000 emails to 10 or so mailboxes. Again, the below came in handy to zap away the offending emails.
Introducing… the Search-Mailbox cmdlet. This can search for specified criteria and will copy the results to a destination mailbox. First off though, we have to tell Search-Mailbox which mailbox(es) to search – do this using the Get-Mailbox cmdlet.
For example:
Get-Mailbox -Identity “UserMailbox To Search” | Search-Mailbox -SearchQuery subject:”This email is SPAM!”,from:”dirtyspammer@spam.com” -TargetMailbox “Mailbox to put search results into” -TargetFolder “A folder in that mailbox”
This will search “UserMailbox to search” for any emails with a subject that contains “This email is SPAM!” and from “dirtyspammer@spam.com”. If it finds any emails that fit the criteria, then it will copy them all to “Mailbox to put search results into” in the folder “A folder in that mailbox”. Simple huh!
Note – if you leave the -Identity off the Get-Mailbox cmdlet, then it will search EVERY mail box in Exchange. Could be handy, but also be quite slow.
Now, if you want to delete emails, it’s pretty much the same command, just put a -DeleteContent onto the Search-Mailbox cmdlet and remove the TargetMailbox/TargetFolder options.
For example:
Get-Mailbox -Identity “UserMailbox To Search” | Search-Mailbox -SearchQuery subject:”This email is SPAM!”,from:”dirtyspammer@spam.com” -DeleteContent
There are a bunch of options you can use with the -SearchQuery option:
Source - http://technet.microsoft.com/en-us/library/bb232132.aspx#AQS
Monday, 28 January 2013
How to Rebuild the Full-Text Index Catalog
How to Rebuild the Full-Text Index Catalog
Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2011-01-12
This topic describes two ways to rebuild the full-text index catalog, programmatically via an Exchange Management Shell script, and by manually deleting the full-text index catalog directory.
To programmatically rebuild the full-text index catalog, run the ResetSearchIndex.ps1 script provided at <drive>:\Program Files\Microsoft\Exchange Server\Scripts\.
To manually rebuild the full-text index catalog, stop the Microsoft Exchange Search Service, delete the old catalog, and then restart the service. This procedure forces the server to re-create the full-text index catalog.
To perform the following procedures, the account you use must be delegated membership in the local Administrators group.
For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.
- Start the Exchange Management Shell.
- Remove the index directories that are associated with specified mailbox databases:
ResetSearchIndex.ps1 [-force] <dbname> [<dbname>]
- Remove the index directories that are associated with all mailbox databases:
ResetSearchIndex.ps1 [-force] -all
- Stop the Microsoft Exchange Search Service by running the following command:
Net Stop MsExchangeSearch
- Delete the full-text index catalog directory.There are scripts located in the \Exchange Server\Scripts directory that can help you to administer and manage Exchange Search. Using the Exchange Management Shell, you can run the following scripts:
- GetDatabaseForSearchIndex.ps1 When the index directory files are provided, this script returns the associated mailbox database names. Example script:
GetDatabaseForSearchIndex IndexDirectoryName1 IndexDirectoryName2
- GetSearchIndexForDatabase.ps1 This script returns index directories for the specified mailbox database names. Example script:
GetSearchIndexForDatabase MailboxdatabaseName1 MailboxdatabaseName2 -All
Note:
The directory name follows the convention CatalogData-<guid>-<guid> where the first <guid> is the GUID of the database, and the second <guid> represents the Instance GUID, which is used on a clustered mailbox server to distinguish between the nodes. The following is an example folder name: \CatalogData-b56624f3-bf19-4463-926f-d4705ac3dd08-cc64dd2d-2428-4f12-bba2-79d6d34c4d27
The typical path for the .edb files and the catalog data directory is: C:\program files\microsoft\exchange server\mailbox\first storage group\
You can use the following example to verify that you are targeting the appropriate catalog directory:GetSearchIndexForDatabase -All
- GetDatabaseForSearchIndex.ps1 When the index directory files are provided, this script returns the associated mailbox database names. Example script:
- Start the Microsoft Exchange Search Service by running the following command:
Net Start MsExchangeSearch
Exchange 2007/2010 Get Out Of Jail Quick Card - No Disk Space
Exchange 2007/2010 Get Out Of Jail Quick Card - No Disk Space
Scenario:
Your Exchange 2007/2010 has run out of disk space on the partition holding the mailbox database and the database has dismounted, there is no quick way to increase the size of the partition, and it looks like the only solution is to move the database to another drive, which will mean downtime whilst the database is dismounted during the move.
Solution:
(A temporary fix to get the database up and running.)
In the folder where the EDB file for the affected Mailbox Database resides, there is a folder with name beginning catalogdata which can be quite large (for example - 15GB for a 250GB database):
If the Microsft Exchange Search Service is stopped by running the command
net stop MsExchangeSearch
or stopping the Microsoft Exchange Search Indexer from services.msc
then the entire catalogdata folder can be shift deleted
After this is done, DO NOT restart the Microsoft Exchange Search Service for two reasons:
1: Restarting MsExchangeSearch will cause the Full-Text Index Catalog to get rebuilt which may fill to the same size as before
2: Rebuilding the Full-Text Index Catalog can cause high CPU utilization, and is best rebuilt out of business hours
Remember this is only a temporary fix to give some breathing space whilst downtime for the mailbox database to be moved to a larger drive - or whatever - can be arranged. Free space on server disk partitions should always be monitored.
Cheers!
Further reading - How to Rebuild the Full-Text Index Cataloghttp://technet.microsoft.com/en-us/library/aa995966(EXCHG.80).aspx
Tuesday, 15 January 2013
Entrust 2048 Certificate issue
Now this issue has been causing me major issues with communication between Lync and Hotmail right from the start, and im please to say it is now resolved with a few months of head scratching and a lot of help from Microsoft Support.
Issues included intermittent communications between Lync / Hotmail - so some times it worked, sometimes it didn't, some users were fine some were not, which also made it a night mare to diagnose.
http://blogs.msdn.com/b/scottos/archive/2009/07/14/federation-and-or-pic-may-fail-against-partners-using-2048-bit-signed-root-cas.aspx
Thanks to Scott Oseychlk for this solution & Many thanks to Jimmy Levesque and Mark Giannotti in ECS Technical Support at Entrust Certificate Services for this information!
========================================================================
Issues included intermittent communications between Lync / Hotmail - so some times it worked, sometimes it didn't, some users were fine some were not, which also made it a night mare to diagnose.
http://blogs.msdn.com/b/scottos/archive/2009/07/14/federation-and-or-pic-may-fail-against-partners-using-2048-bit-signed-root-cas.aspx
Thanks to Scott Oseychlk for this solution & Many thanks to Jimmy Levesque and Mark Giannotti in ECS Technical Support at Entrust Certificate Services for this information!
========================================================================
Summary:
You may find that OCS 2007 / OCS 2007 R2's Federation and/or PIC fails against partners who do not support Entrust root certificates signed using a 2048-bit public key.
For example, the "broken" certificate chain may resemble the following:
Edge server's certificate -> Entrust L1B chain -> Entrust 2048 Root
Workaround:
For Federated partners who do not support the 2048-bit Root, you can introduce an additional chain certificate which points back to the Entrust 1024-bit root. The chain of authority would then be as follows:
Edge server's certificate -> Entrust L1B chain -> Entrust 2048 chain -> Entrust 1024 Root
To accomplish this, you will be replacing the Entrust 2048 Root certificate with the attached Entrust 2048 chain certificate.
Here are the steps to follow:
1. Start up your MMC console and add the Certificates snap-in for your server's Computer Account.
2. Under "Trusted Root Certification Authorities/Certificates," remove the Entrust.net Certification Authorities (2048) certificate.
3. Ensure you have the Entrust.net Secure Server Certification Authority certificate under the same Trusted Roots folder.
4. Under "Intermediate Certification Authorities/Certificates," import the attached Entrust.net Certification Authorities (2048) chain certificate as follows:
i. Save the attached "2048-to-1024-Cross-Cert.txt" 2048 chain certificate as a *.crt file.
ii. In MMC, expand the Intermediate Certification Authorities folder.
iii. Right-click on Certificates and select All Tasks -> Import
iv. Follow the resulting Certificate Import Wizard to import the 2048 chain certificate into the Intermediate Certification Authorities store.
5. Check to make sure you have two Entrust Certificates under Intermediate Certification Authorities/Certificates: The Entrust Certification Authority - L1B and the Entrust.net Certificate Authority (2048).
Credits:
Many thanks to Jimmy Levesque and Mark Giannotti in ECS Technical Support at Entrust Certificate Services for this information!
Update (December 10, 2009):
We have successfully tested & validated that communicating with AOL via PIC (using a certificate rooted against a CA that is signed with 2048 bits) works properly.
=================================================================================
You can download the file from here:
http://sdrv.ms/10wCspt
Saturday, 2 June 2012
Exchange Special Mailboxes - System Attendant mailbox
This post is a follow-on post to the SystemMailbox post from last week.
Here I’m talking about System Attendant mailbox in Exchange 200x.
System Attendant mailbox
What is it and what is it used for?
Each Exchange 200x server has one (and hopefully only one) System Attendant mailbox. If the server has a System Attendent mailbox (note the misspelling), someone has probably been messing around with the server. Yes, I put that in mostly so it would be indexed with the incorrect spelling as a keyword also. J
The System Attendant mailbox has a folder within it called SpecialPrivateFolderForFreeBusyStorage. This folder is used when CDO or OWA push Free/Busy information up to the store through the MSExchangeFBPublish process.
System Attendant mailbox is also required to be available during mailbox moves. For instance, if you have the mailbox store containing the System Attendant mailbox dismounted during a mailbox move, the move will fail and you’ll find events 9175, 9167, and 1008 in your application event log (see KB.264413).
The SA mailbox is also used to send and receive the messages used by the legacy link monitoring service.
Where can it be found?
There are two parts to make up the complete System Attendant mailbox: a directory object and a mailbox object. The directory object is the actual System Attendant object in the configuration container (ie, at a location like: CN=Microsoft System Attendant,CN=<servername>,CN=Servers,CN=<sitename>,CN=Administrative Groups,CN=<orgname>,CN=Microsoft Exchange,CN=Services,CN=Configuration,CN=<domain> ). This directory object hosts all of the directory attributes associated with the system attendant. There is also a mailbox object, stored in the first Mailbox store created on an Exchange 200x server. This is generally the “Mailbox Store (servername)” store.
When does it get created? Can it be moved and/or recreated?
The System Attendant mailbox is created when the System Attendant is created on a server. It is associated with the first mailbox store created on a server.
If an attempt is made to delete the mailbox store containing the System Attendant mailbox, the following warning will appear:
“Deleting this mailbox store may result in the loss of system messages used by Exchange, such as Free/Busy or Key Management Security. If you choose to continue, you need to restart the system attendant service after the store is deleted.”
If the store is then deleted, the System Attendant mailbox will be moved automatically into another mailbox store on the server (ie – the HomeMDB value on the directory object will be updated). System Attendant service will have to be restarted to reconfigure MSExchangeFBPublish to use the new mailbox location, and the mailbox object may not reappear under the “Mailboxes” node of ESM until it is used in the future.
If there is a System Attendant directory object but no mailbox object (ie – one good cause of this is dropping in a blank store for troubleshooting), the mailbox store object will be recreated automatically in the mailbox store referenced by the HomeMDB attribute as soon as it’s needed.
How can I log onto the System Attendant mailbox?
It can be done, but it’s a fairly complicated set of steps and you’ll have to call PSS to get them.
SHOULD I log on to the System Attendant mailbox?
Probably not. I can’t think of any good reasons for accessing this mailbox without PSS directing you to do so.
What happens if I don’t have a proper System Attendant mailbox?
If there’s no System Attendant mailbox available on a server (and in a mounted and functional mailbox store), anything that requires it will almost certainly fail. You’ll see 9175 events logged in the application log, indicating a failure to logon to this mailbox by the system. You’ll see OWA-generated Free/Busy information not getting updated. You’ll see mailbox moves fail. It’s a very important mailbox to have configured properly and available!
(Added some more on Dec 27, 2004):
Should I delete it? Do I have to delete it before I can uninstall the Exchange server?
Nope, definitely should not delete it. If you’re getting the error “One or more users currently use this mailbox store. These users must be moved to a different mailbox store or be mail disabled before deleting this store. ID no: c1034a7f Exchange System Manager” when trying to remove the mailbox store or uninstall the server, this is not due to the System Attendant Mailbox. Have a look at KB.279202 for more information on how to determine which mailbox is causing this behavior.
System Attendant mailbox
What is it and what is it used for?
Each Exchange 200x server has one (and hopefully only one) System Attendant mailbox. If the server has a System Attendent mailbox (note the misspelling), someone has probably been messing around with the server. Yes, I put that in mostly so it would be indexed with the incorrect spelling as a keyword also. J
The System Attendant mailbox has a folder within it called SpecialPrivateFolderForFreeBusyStorage. This folder is used when CDO or OWA push Free/Busy information up to the store through the MSExchangeFBPublish process.
System Attendant mailbox is also required to be available during mailbox moves. For instance, if you have the mailbox store containing the System Attendant mailbox dismounted during a mailbox move, the move will fail and you’ll find events 9175, 9167, and 1008 in your application event log (see KB.264413).
The SA mailbox is also used to send and receive the messages used by the legacy link monitoring service.
Where can it be found?
There are two parts to make up the complete System Attendant mailbox: a directory object and a mailbox object. The directory object is the actual System Attendant object in the configuration container (ie, at a location like: CN=Microsoft System Attendant,CN=<servername>,CN=Servers,CN=<sitename>,CN=Administrative Groups,CN=<orgname>,CN=Microsoft Exchange,CN=Services,CN=Configuration,CN=<domain> ). This directory object hosts all of the directory attributes associated with the system attendant. There is also a mailbox object, stored in the first Mailbox store created on an Exchange 200x server. This is generally the “Mailbox Store (servername)” store.
When does it get created? Can it be moved and/or recreated?
The System Attendant mailbox is created when the System Attendant is created on a server. It is associated with the first mailbox store created on a server.
If an attempt is made to delete the mailbox store containing the System Attendant mailbox, the following warning will appear:
“Deleting this mailbox store may result in the loss of system messages used by Exchange, such as Free/Busy or Key Management Security. If you choose to continue, you need to restart the system attendant service after the store is deleted.”
If the store is then deleted, the System Attendant mailbox will be moved automatically into another mailbox store on the server (ie – the HomeMDB value on the directory object will be updated). System Attendant service will have to be restarted to reconfigure MSExchangeFBPublish to use the new mailbox location, and the mailbox object may not reappear under the “Mailboxes” node of ESM until it is used in the future.
If there is a System Attendant directory object but no mailbox object (ie – one good cause of this is dropping in a blank store for troubleshooting), the mailbox store object will be recreated automatically in the mailbox store referenced by the HomeMDB attribute as soon as it’s needed.
How can I log onto the System Attendant mailbox?
It can be done, but it’s a fairly complicated set of steps and you’ll have to call PSS to get them.
SHOULD I log on to the System Attendant mailbox?
Probably not. I can’t think of any good reasons for accessing this mailbox without PSS directing you to do so.
What happens if I don’t have a proper System Attendant mailbox?
If there’s no System Attendant mailbox available on a server (and in a mounted and functional mailbox store), anything that requires it will almost certainly fail. You’ll see 9175 events logged in the application log, indicating a failure to logon to this mailbox by the system. You’ll see OWA-generated Free/Busy information not getting updated. You’ll see mailbox moves fail. It’s a very important mailbox to have configured properly and available!
(Added some more on Dec 27, 2004):
Should I delete it? Do I have to delete it before I can uninstall the Exchange server?
Nope, definitely should not delete it. If you’re getting the error “One or more users currently use this mailbox store. These users must be moved to a different mailbox store or be mail disabled before deleting this store. ID no: c1034a7f Exchange System Manager” when trying to remove the mailbox store or uninstall the server, this is not due to the System Attendant Mailbox. Have a look at KB.279202 for more information on how to determine which mailbox is causing this behavior.
How to Configure a Relay Connector for Exchange Server 2010
Taken from:
http://exchangeserverpro.com/how-to-configure-a-relay-connector-for-exchange-server-2010
In most Exchange Server 2010 environments there will be the need to allow relaying for certain hosts, devices or applications to send email via the Exchange server. This is common with multi-function devices such as network attached printer/scanners, or applications such as backup software that send email reports.
SMTP communication is handled by the Hub Transport server in an Exchange organization. The transport service listens for SMTP connections on it’s default Receive Connector. However, this connector is secured by default to not allow anonymous connections (ie, the type of connection most non-Exchange systems will be making).
You can see this in effect if you telnet to the server on port 25 and try to initiate unauthenticated SMTP communications.
220 EX3.exchangeserverpro.local Microsoft ESMTP MAIL Service ready at Wed, 18 Au
g 2010 19:42:27 +1000
helo
250 EX3.exchangeserverpro.local Hello [192.168.0.9]
mail from: somebody@hotmail.com
530 5.7.1 Client was not authenticated
For some Hub Transport servers that are internet-facing, anonymous connections may already be enabled. In those cases relay would still be denied but will behave differently than the first example.
220 EX3.exchangeserverpro.local Microsoft ESMTP MAIL Service ready at Wed, 18 Au
g 2010 20:01:44 +1000
helo
250 EX3.exchangeserverpro.local Hello [192.168.0.9]
mail from: somebody@hotmail.com
250 2.1.0 Sender OK
rcpt to: somebody@gmail.com
550 5.7.1 Unable to relay
You’ll note that relay is denied if I try to send from an @hotmail.com address to an @gmail.com address, because neither is a valid domain for the Exchange organization. But with Anonymous Users enabled on the Receive Connector I can send from an @hotmail.com address to a valid local address.
220 EX3.exchangeserverpro.local Microsoft ESMTP MAIL Service ready at Wed, 18 Au
g 2010 20:05:54 +1000
helo
250 EX3.exchangeserverpro.local Hello [192.168.0.9]
mail from: somebody@hotmail.com
250 2.1.0 Sender OK
rcpt to: alan.reid@exchangeserverpro.local
250 2.1.5 Recipient OK
data
354 Start mail input; end with .
test
.
250 2.6.0 [In
ternalId=2] Queued mail for delivery
However if I try to relay out to an external recipient, the Exchange server does not allow it.
220 EX3.exchangeserverpro.local Microsoft ESMTP MAIL Service ready at Wed, 18 Au
g 2010 20:11:27 +1000
helo
250 EX3.exchangeserverpro.local Hello [192.168.0.9]
mail from: backups@exchangeserverpro.net
250 2.1.0 Sender OK
rcpt to: alerts@managedserviceprovider.com
550 5.7.1 Unable to relay
To permit a non-Exchange server to relay mail we can create a new Receive Connector on the Hub Transport server. Launch the Exchange Management Console and navigate to Server Management, and then Hub Transport. Select the Hub Transport server you wish to create the new Receive Connector on, and from the Actions pane of the console choose New Receive Connector.
- newreceiveconnector01.png (48.71 KiB) Viewed 4 times
Give the new connector a name such as “Relay ” and click Next to continue.
- newreceiveconnector02.png (12.04 KiB) Viewed 4 times
You can leave the local network settings as is, or optionally you can use a dedicated IP address for this connector if one has already been allocated to the server. Using dedicated IP addresses for each connector is sometimes required if you need to create connectors with different authentication settings, but for a general relay connector it is not necessary to change it.
- newreceiveconnector03.png (5.81 KiB) Viewed 4 times
Highlight the default IP range in the remote network settings and click the red X to delete it.
- newreceiveconnector04.png (6.2 KiB) Viewed 4 times
Now click the Add button and enter the IP address of the server you want to allow to relay through the Exchange server. Click OK to add it and then Next to continue
- newreceiveconnector05.png (8.53 KiB) Viewed 4 times
Click the New button to complete the wizard.
The Receive Connector has now been created but is not yet ready to allow the server to relay through it. Go back to the Exchange Management Console, right-click the newly created Receive Connector and choose properties.
Select the Permission Groups tab and tick the Exchange Servers box.
- newreceiveconnector07.png (3.58 KiB) Viewed 4 times
Select the Authentication Tab and tick the Externally Secured box.
- newreceiveconnector06.png (5.37 KiB) Viewed 4 times
Apply the changes and the Receive Connector is now ready for the server to relay through.
220 EX3.exchangeserverpro.local Microsoft ESMTP MAIL Service ready at Wed, 18 Au
g 2010 20:31:00 +1000
helo
250 EX3.exchangeserverpro.local Hello [192.168.0.9]
mail from: backups@exchangeserverpro.net
250 2.1.0 Sender OK
rcpt to: alerts@managedserviceprovider.com
250 2.1.5 Recipient OK
data
354 Start mail input; end with .
test
.
250 2.6.0 <924bab1e-0f07-4054-8700-d121577993b4@EX3.exchangeserverpro.local> [In
ternalId=3] Queued mail for delivery
Because the remote IP range has been secured to that single IP address, any other servers on different IP addresses still won’t be able to relay through the Exchange Server. From any other IP address not included in the remote IP range on the Receive Connector relay will be denied.
220 EX3.exchangeserverpro.local Microsoft ESMTP MAIL Service ready at Wed, 18 Au
g 2010 20:46:06 +1000
helo
250 EX3.exchangeserverpro.local Hello [192.168.0.2]
mail from: backups@exchangeserverpro.net
250 2.1.0 Sender OK
rcpt to: alerts@managedserviceprovider.com
550 5.7.1 Unable to relay
You can later add more IP addresses, IP ranges, subnets, or even add multiple IP addresses to the Receive Connector using a script if necessary.
Useful Exchange Commandlets
Get Mailbox
Get-MailboxStatistics | where {$_.TotalItemSize -gt 1MB} | sort-object DatabaseName, TotalItemSize,LastLogonTime | format-table DisplayName, @{expression={$_.TotalItemSize.Value.ToMB()};label=”TotalItemSize(MB)”}, LastLogonTime, DatabaseName
(This will give you info on the selected users mailbox size, last login time and database)
Get-MailboxStatistics | where {$_.TotalItemSize -gt 1MB} | sort-object DatabaseName, TotalItemSize,LastLogonTime | format-table DisplayName, @{expression={$_.TotalItemSize.Value.ToMB()};label=”TotalItemSize(MB)”}, LastLogonTime, DatabaseName
(This will give you info on the selected users mailbox size, last login time and database)
you could use:
Get-MailboxStatistics –id “User name” |fl displayname,totalitemsize
Message Trackign log:
Get-MessageTrackingLog -Start "04/13/2009 9:00AM" -End "04/26/2009 5:00PM" -Sender "jamesluo@sg.com" | Select-Object Timestamp,Sender, {$_.recipients}, MessageSubject | export-csv c:\QueryAllRecipients.csv
Add full mailbox permission:
Add-MailboxPermission -Identity 'CN=Journal Technical,OU=Technical,DC=EGRP,DC=local' -User 'EGRP\Domain Admins' -AccessRights 'FullAccess'
How To Check Exchange Database Size with PowerShell
Get-MailboxDatabase -Status | select ServerName,Name,DatabaseSize
Edge Sync
Start-EdgeSynchronization -Server Hub1
Calendar Permissions:
add-MailboxFolderPermission -Identity DarrenBos:\calendar -AccessRights Editor -User Scotteastman
Which Servers are people logged onto
Get-LogonStatistics -Identity "seastman" |fl clientname
Message Tracking
Get-Exchangeserver | where {$_.isHubTransportServer -eq $true -or $_.isMailboxServer -eq $true} | Get-Messagetrackinglog -sender user@domain.com -MessageSubject "Subject of message” -Start "8/27/2010 7:00 AM" -End "8/27/2010 11:00 AM" | Select-Object Timestamp,Clienthostname,eventid,source,sender,@{Name="Recipients";Expression={$_.recipients}},Recipientcount,serverhostname,SourceContext | Export-Csv c:\temp\Messageinfo.csv
Search mailbox - then put results into my mailbox in folder called XEN:
Search-Mailbox -Identity zwood -SearchQuery "From:'cs@enta.net'" -TargetMailbox seastman -TargetFolder "XEN" -LogLevel Full
Removing Emails from all mailbox's
Get-Mailbox -database "ENTA IT" -resultsize unlimited | Search-Mailbox -SearchQuery "From:'*@*.acidkrew.com'" -DeleteContent
Get-Mailbox -resultsize unlimited | Search-Mailbox -SearchQuery "From:'xraytechnician.ekcgen@aqveii.acidkrew.com'" -DeleteContent
Get-Mailbox -resultsize unlimited | Search-Mailbox -SearchQuery "From:'User X' To:'All Email Users'" -DeleteContent
Get-Mailbox -resultsize unlimited | Search-Mailbox -SearchQuery "Subject: Update Your E-Mail Details Account" -DeleteContent
Tracking Emails
get-messagetrackinglog -Server "ourExch2007" -Start "10/25/2009 9:34:00 AM" -End "11/6/2009 9:44:00 AM" -resultsize unlimited |where {$_.Sender -like "*@domain.com"}
Wondering how many log files are generated per database every minute? Quickly find out by typing:
Get-MailboxDatabase -Server $env:ComputerName | %{ Get-ChildItem -Path $_.LogFolderPath -Filter "*????.log" | Group-Object -Property {$_.LastWriteTime.Day,$_.LastWriteTime.Hour,$_.LastWriteTime.minute} | ?{$_.Count -gt 1} | Measure-Object - Property Count -Min -Max -Ave }
Mailbox Size
Get-MailboxStatistics -server exchangemb11 | Sort-Object TotalItemSize -Descending | ft Display
Name,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount | Format-List > c:\file.txt
Export Mailbox Request
New-MailboxExportRequest -Mailbox journal1 -FilePath "\\vmmlibrary\Exchange_Backup\Journal Backup\Master Journal\Journal1.pst"
Get-MailboxStatistics –id “User name” |fl displayname,totalitemsize
Message Trackign log:
Get-MessageTrackingLog -Start "04/13/2009 9:00AM" -End "04/26/2009 5:00PM" -Sender "jamesluo@sg.com" | Select-Object Timestamp,Sender, {$_.recipients}, MessageSubject | export-csv c:\QueryAllRecipients.csv
Add full mailbox permission:
Add-MailboxPermission -Identity 'CN=Journal Technical,OU=Technical,DC=EGRP,DC=local' -User 'EGRP\Domain Admins' -AccessRights 'FullAccess'
How To Check Exchange Database Size with PowerShell
Get-MailboxDatabase -Status | select ServerName,Name,DatabaseSize
Edge Sync
Start-EdgeSynchronization -Server Hub1
Calendar Permissions:
add-MailboxFolderPermission -Identity DarrenBos:\calendar -AccessRights Editor -User Scotteastman
Which Servers are people logged onto
Get-LogonStatistics -Identity "seastman" |fl clientname
Message Tracking
Get-Exchangeserver | where {$_.isHubTransportServer -eq $true -or $_.isMailboxServer -eq $true} | Get-Messagetrackinglog -sender user@domain.com -MessageSubject "Subject of message” -Start "8/27/2010 7:00 AM" -End "8/27/2010 11:00 AM" | Select-Object Timestamp,Clienthostname,eventid,source,sender,@{Name="Recipients";Expression={$_.recipients}},Recipientcount,serverhostname,SourceContext | Export-Csv c:\temp\Messageinfo.csv
Search mailbox - then put results into my mailbox in folder called XEN:
Search-Mailbox -Identity zwood -SearchQuery "From:'cs@enta.net'" -TargetMailbox seastman -TargetFolder "XEN" -LogLevel Full
Removing Emails from all mailbox's
Get-Mailbox -database "ENTA IT" -resultsize unlimited | Search-Mailbox -SearchQuery "From:'*@*.acidkrew.com'" -DeleteContent
Get-Mailbox -resultsize unlimited | Search-Mailbox -SearchQuery "From:'xraytechnician.ekcgen@aqveii.acidkrew.com'" -DeleteContent
Get-Mailbox -resultsize unlimited | Search-Mailbox -SearchQuery "From:'User X' To:'All Email Users'" -DeleteContent
Get-Mailbox -resultsize unlimited | Search-Mailbox -SearchQuery "Subject: Update Your E-Mail Details Account" -DeleteContent
Tracking Emails
get-messagetrackinglog -Server "ourExch2007" -Start "10/25/2009 9:34:00 AM" -End "11/6/2009 9:44:00 AM" -resultsize unlimited |where {$_.Sender -like "*@domain.com"}
Wondering how many log files are generated per database every minute? Quickly find out by typing:
Get-MailboxDatabase -Server $env:ComputerName | %{ Get-ChildItem -Path $_.LogFolderPath -Filter "*????.log" | Group-Object -Property {$_.LastWriteTime.Day,$_.LastWriteTime.Hour,$_.LastWriteTime.minute} | ?{$_.Count -gt 1} | Measure-Object - Property Count -Min -Max -Ave }
Mailbox Size
Get-MailboxStatistics -server exchangemb11 | Sort-Object TotalItemSize -Descending | ft Display
Name,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount | Format-List > c:\file.txt
Export Mailbox Request
New-MailboxExportRequest -Mailbox journal1 -FilePath "\\vmmlibrary\Exchange_Backup\Journal Backup\Master Journal\Journal1.pst"
get-messagetrackinglog -Sender
"Jim.Woods@entagroup.com" | Select-Object Timestamp,Sender,
{$_.recipients}, MessageSubject | export-csv 'V:\IT\Exchange\LOGS\Jim
Woods\jimEdge.csv'
Use the Shell to remove a mailbox export request:
Remove-MailboxExportRequest -Identity "Ayla\MailboxExport"
Use the Shell to remove multiple mailbox export requests:
Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest
Remove-MailboxExportRequest -Identity "Ayla\MailboxExport"
Use the Shell to remove multiple mailbox export requests:
Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest
Archiving Info:
Get-Mailbox | where {$_.ArchiveDatabase -ne $null}
Get-Mailbox | where {$_.ArchiveDatabase -ne $null} | ft name, archivedatabase, archivename, archivequota, archivewarningquota -AutoSize
Find a users Archive information:
get-mailboxstatistics mailboxname –archive
Get-Mailbox -archive | Get-MailboxStatistics -archive |fl DisplayName, Total*
Get-Mailbox | where {$_.ArchiveDatabase -ne $null}
Get-Mailbox | where {$_.ArchiveDatabase -ne $null} | ft name, archivedatabase, archivename, archivequota, archivewarningquota -AutoSize
Find a users Archive information:
get-mailboxstatistics mailboxname –archive
Get-Mailbox -archive | Get-MailboxStatistics -archive |fl DisplayName, Total*
Export Tracking Logs to CSV
Export-MessageTrackingLogsForRecipient.ps1 -Recipient steve -OutputCSV .\output.csv
Export-MessageTrackingLogsForRecipient.ps1 -Recipient steve -OutputCSV .\output.csv
Mailbox Size Report:
get-mailbox | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{
label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},@{label="TotalItemSize(GB)";expression={$_.TotalItemSize.Value.ToGB()}} >c:\scott4.xls
Database size report:
Get-MailboxDatabase -status | Sort-Object databaseSize -Descending |ft name,databasesize
get-mailbox | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{
label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},@{label="TotalItemSize(GB)";expression={$_.TotalItemSize.Value.ToGB()}} >c:\scott4.xls
Database size report:
Get-MailboxDatabase -status | Sort-Object databaseSize -Descending |ft name,databasesize
Get Managed Folder Assistant
Get-MailboxServer | fl Name,ManagedFolderAssistantSchedule
Get Mailbox Database Copy Status
Get-mailboxdatabasecopystatus -connectionstatus | fl name,outgoingconnections,incominglogcopyingnetwork
Add Domain Admins FULL access rights to every mailbox
Get-MailboxDatabase | Add-ADPermission -user "Domain Admins" -AccessRights GenericAll
Get-MailboxServer | fl Name,ManagedFolderAssistantSchedule
Get Mailbox Database Copy Status
Get-mailboxdatabasecopystatus -connectionstatus | fl name,outgoingconnections,incominglogcopyingnetwork
Add Domain Admins FULL access rights to every mailbox
Get-MailboxDatabase | Add-ADPermission -user "Domain Admins" -AccessRights GenericAll
Enable Pipeline Tracing
Set-TransportServer -id Exchangemb11 -PipelineTracingEnabled $true -PipelineTracingSenderAddress news@entagroup.com -PipelineTracingPath "C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\PipelineTracing"
First turn it on: Set-TransportServer Server1 -PipelineTracingEnabled $True
This will create a folder called PipelineTracing and all the email messages and info will be in there
Mailbox Permission Change:
Add-MailboxPermission -Identity 'CN=Journal Master4,OU=IT,DC=EGRP,DC=local' -User 'EGRP\Domain Admins' -AccessRights 'FullAccess'
Set-TransportServer -id Exchangemb11 -PipelineTracingEnabled $true -PipelineTracingSenderAddress news@entagroup.com -PipelineTracingPath "C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\PipelineTracing"
First turn it on: Set-TransportServer Server1 -PipelineTracingEnabled $True
This will create a folder called PipelineTracing and all the email messages and info will be in there
Mailbox Permission Change:
Add-MailboxPermission -Identity 'CN=Journal Master4,OU=IT,DC=EGRP,DC=local' -User 'EGRP\Domain Admins' -AccessRights 'FullAccess'
Using web parts in Exchange OWA
https://portal.domain.com/owa/?cmd=contents&fpath=calendar&view=monthly
This will give you just the calendar for the logged on user
You can also change path=inbox / contacts / tasks etc to just view those parts
This will give you just the calendar for the logged on user
You can also change path=inbox / contacts / tasks etc to just view those parts
Exchange Mailbox Size
List Exchange users by mailbox size in Exchange 2007 & 2010
This tip shows you how to query an Exchange mail server to determine users with the largest mailboxes. This is useful if you need to move mailboxes to reduce store size, or find users to ping about reducing their mailbox.
The command to do this is as follows. You can copy-paste this into the Exchange Management Shell on your server:
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount
And you should get the following output:
DisplayName TotalItemSize(MB) ItemCount
----------- ----------------- ---------
Lastname, Firstname 1934 30959
Lastname, Firstname 1849 40519
Lastname, Firstname 1841 43277
Lastname, Firstname 1770 41790
Lastname, Firstname 1643 43348
Lastname, Firstname 1511 21973
Lastname, Firstname 1500 31290
Lastname, Firstname 1499 34474
Lastname, Firstname 1482 25253
Lastname, Firstname 1468 15313
Lastname, Firstname 1461 20534
Lastname, Firstname 1410 31545
Lastname, Firstname 1396 22245
Lastname, Firstname 1344 24807
Lastname, Firstname 1314 25633
... etc ...
The important column is the second one, TotalItemSize. As you can see the largest mailbox is listed first, and is a whopping 1.9 GB.
The breakdown of the command is as follows. Management Shell uses the powerful Unix pipeline idiom to pass and filter output between commands.
The first command is Get-MailboxStatistics which does pretty much what it sounds like it does.
This output is piped to the Sort-Object command, which orders by the TotalItemSize column in descending order.
The Sort-Object output is then transformed via pipe by the Format-Table command, ft for short. This command gives you control of how the 'table' output will be viewed. In this case it transforms TotalItemSize from bytes to megabytes, which is much easier to grok. It also selects only the columns you want to see.
This tip shows you how to query an Exchange mail server to determine users with the largest mailboxes. This is useful if you need to move mailboxes to reduce store size, or find users to ping about reducing their mailbox.
The command to do this is as follows. You can copy-paste this into the Exchange Management Shell on your server:
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount
And you should get the following output:
DisplayName TotalItemSize(MB) ItemCount
----------- ----------------- ---------
Lastname, Firstname 1934 30959
Lastname, Firstname 1849 40519
Lastname, Firstname 1841 43277
Lastname, Firstname 1770 41790
Lastname, Firstname 1643 43348
Lastname, Firstname 1511 21973
Lastname, Firstname 1500 31290
Lastname, Firstname 1499 34474
Lastname, Firstname 1482 25253
Lastname, Firstname 1468 15313
Lastname, Firstname 1461 20534
Lastname, Firstname 1410 31545
Lastname, Firstname 1396 22245
Lastname, Firstname 1344 24807
Lastname, Firstname 1314 25633
... etc ...
The important column is the second one, TotalItemSize. As you can see the largest mailbox is listed first, and is a whopping 1.9 GB.
The breakdown of the command is as follows. Management Shell uses the powerful Unix pipeline idiom to pass and filter output between commands.
The first command is Get-MailboxStatistics which does pretty much what it sounds like it does.
This output is piped to the Sort-Object command, which orders by the TotalItemSize column in descending order.
The Sort-Object output is then transformed via pipe by the Format-Table command, ft for short. This command gives you control of how the 'table' output will be viewed. In this case it transforms TotalItemSize from bytes to megabytes, which is much easier to grok. It also selects only the columns you want to see.
Search Exchange Message Tracking logs for wildcard values
Unfortunately the Exchange Management Console does not allow use of
wildcard values for things like senders and recipients. These need to be
specific user or list of users. However you can search these logs for
wildcard values using the Exchange Management Shell.
Here are two examples to search for any user at example.com. These will output the results to a text file for easier viewing. Make sure to update the date ranges and domain name as needed.
Search for messages sent TO any users at example.com:
Get-MessageTrackingLog -ResultSize Unlimited -Start "5/1/2011" -End "5/12/2011" | where{$_.recipients -like "*@example.com"} | select-object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,{$_.Recipients} | export-csv C:\ExchangeLogResults.txt
Search for messages sent FROM users at example.com:
Get-MessageTrackingLog -ResultSize Unlimited -Start "5/1/2011" -End "5/12/2011" | where{$_.sender -like "*@example.com"} | select-object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,{$_.Recipients} | export-csv C:\ExchangeLogResults.txt
This information applies to Exchange 2003, 2007, and 2010.
Here are two examples to search for any user at example.com. These will output the results to a text file for easier viewing. Make sure to update the date ranges and domain name as needed.
Search for messages sent TO any users at example.com:
Get-MessageTrackingLog -ResultSize Unlimited -Start "5/1/2011" -End "5/12/2011" | where{$_.recipients -like "*@example.com"} | select-object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,{$_.Recipients} | export-csv C:\ExchangeLogResults.txt
Search for messages sent FROM users at example.com:
Get-MessageTrackingLog -ResultSize Unlimited -Start "5/1/2011" -End "5/12/2011" | where{$_.sender -like "*@example.com"} | select-object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,{$_.Recipients} | export-csv C:\ExchangeLogResults.txt
This information applies to Exchange 2003, 2007, and 2010.
How to Export Message Tracking Results in Exchange 2010
I know we all were a little uncomfortable when Microsoft has come up
with the new Message Tracking in Exchange Server 2007 and Exchange 2010
(of course even me). But, now I become very comfortable with it and
mainly because of its flexibility/features. Recently the message
tracking helped me in identifying a spam attack from an application
server, which made me to write this post. Here I have tried to explain
how to easily track and export the tracking results to a file and do the
further filtration for troubleshooting purpose.
Note – I used the Exchange 2010 SP1 Exchange Management Console and Shell.
Open the Tool Box from EMC and locate Tracking Log Explorer, and do your normal tracking for a desired output. Here I did tracking for couple of test message that I sent.
Below shows the result window,
As you know that the Exchange 2007 and 2010 tracking give plenty of detail in the message tracking result. Now, how will you interpret these results? Is it easy to read the information shows in this output?
At least few time you would have thought, how we can export these results. It is not difficult for administrators who work with Exchange Management Shell. Don’t worry, it is not difficult for you who are not comfortable with Shell as well.
Copy the Exchange Management Shell command from the Message tracking page,
get-messagetrackinglog -MessageSubject "Test Message to Verify Tracking Details" -Start "6/26/2011 9:00:00 PM" -End "6/26/2011 9:30:00 PM"
End of the Shell command that you copied add the field needed to export with a ‘select’ filter, see the below modified shell command.
get-messagetrackinglog -MessageSubject "Test Message to Verify Tracking Details" -Start "6/26/2011 9:00:00 PM" -End "6/26/2011 9:30:00 PM" | select timestamp, ClientIp, ClientHostname, ServerIp, ServerHostname, SourceContext, ConnectorId, Source, EventId, InternalMessageId, MessageId, {$_.Recipients}, {$_.RecipientStatus}, TotalBytes, RecipientCount, RelatedRecipientAddress, Reference, MessageSubject, Sender, ReturnPath, MessageInfo >c:\Track-results.csv
Open the results file in excel and do your rest of filtration, that’s it... you have done.
You may select only the fields that you need during the shell command execution, use the table below to decide your fields.
Timestamp
ClientIp
ClientHostname
ServerIp
ServerHostname
SourceContext
ConnectorId
Source
EventId
InternalMessageId
MessageId
Recipients
RecipientStatus
TotalBytes
RecipientCount
RelatedRecipientAddress
Reference
MessageSubject
Sender
ReturnPath
MessageInfo
Hope now you will like the message tracking of Exchange 2007 and 2010. You may use the same approach when tracking in Exchange 2007, more or less the same.
Note – I used the Exchange 2010 SP1 Exchange Management Console and Shell.
Open the Tool Box from EMC and locate Tracking Log Explorer, and do your normal tracking for a desired output. Here I did tracking for couple of test message that I sent.
- Message_Tracking_-EMC1.png (6.81 KiB) Viewed 1 time
Below shows the result window,
- Message_Tracking_-EMC2.png (14 KiB) Viewed 1 time
As you know that the Exchange 2007 and 2010 tracking give plenty of detail in the message tracking result. Now, how will you interpret these results? Is it easy to read the information shows in this output?
At least few time you would have thought, how we can export these results. It is not difficult for administrators who work with Exchange Management Shell. Don’t worry, it is not difficult for you who are not comfortable with Shell as well.
Copy the Exchange Management Shell command from the Message tracking page,
get-messagetrackinglog -MessageSubject "Test Message to Verify Tracking Details" -Start "6/26/2011 9:00:00 PM" -End "6/26/2011 9:30:00 PM"
End of the Shell command that you copied add the field needed to export with a ‘select’ filter, see the below modified shell command.
get-messagetrackinglog -MessageSubject "Test Message to Verify Tracking Details" -Start "6/26/2011 9:00:00 PM" -End "6/26/2011 9:30:00 PM" | select timestamp, ClientIp, ClientHostname, ServerIp, ServerHostname, SourceContext, ConnectorId, Source, EventId, InternalMessageId, MessageId, {$_.Recipients}, {$_.RecipientStatus}, TotalBytes, RecipientCount, RelatedRecipientAddress, Reference, MessageSubject, Sender, ReturnPath, MessageInfo >c:\Track-results.csv
- Message_Tracking_-EMS.png (7.8 KiB) Viewed 1 time
Open the results file in excel and do your rest of filtration, that’s it... you have done.
- Message_Tracking_CSV.png (14.13 KiB) Viewed 1 time
You may select only the fields that you need during the shell command execution, use the table below to decide your fields.
Timestamp
ClientIp
ClientHostname
ServerIp
ServerHostname
SourceContext
ConnectorId
Source
EventId
InternalMessageId
MessageId
Recipients
RecipientStatus
TotalBytes
RecipientCount
RelatedRecipientAddress
Reference
MessageSubject
Sender
ReturnPath
MessageInfo
Hope now you will like the message tracking of Exchange 2007 and 2010. You may use the same approach when tracking in Exchange 2007, more or less the same.
Changing Certificate on CAS Servers
Go to IIS7 and click on portal.domain.com - then go to Sites / Default Web site
Then on right hand side go to bindings and on "https-443-*" Edit and select the correct certificate
Restart IIS
Then you will have to run these commands on the CAS Servers to change the outlook provider to the new certificate name (E.g. the new cert i have used below is for portal.entagroup.com)
Set-OutlookProvider EXPR -CertPrincipalName:"msstd:portal.domain.com"
Set-OutlookProvider EXCH -CertPrincipalName:"msstd:portal.domain.com"
This setting relates to the account info in outlook - under account and more settings / Connections Tab / Outlook anywhere / Exchange Proxy Settings / Proxy Server principal name
Then on right hand side go to bindings and on "https-443-*" Edit and select the correct certificate
Restart IIS
Then you will have to run these commands on the CAS Servers to change the outlook provider to the new certificate name (E.g. the new cert i have used below is for portal.entagroup.com)
Set-OutlookProvider EXPR -CertPrincipalName:"msstd:portal.domain.com"
Set-OutlookProvider EXCH -CertPrincipalName:"msstd:portal.domain.com"
This setting relates to the account info in outlook - under account and more settings / Connections Tab / Outlook anywhere / Exchange Proxy Settings / Proxy Server principal name
DAG and DAC (Datacenter Activation Coordination)
When you have a two-member
DAG, the system can no distinguish between the different types of
failure. It could be a single server failure, a multiple-server failure
or a site failure. To manage a datacenter switchover for a two-member
DAG that is extended across multiple datacenters you must use Windows
failover cluster management tools.
More information on datacenter switchovers can be found here:
http://technet.microsoft.com/en-us/libr ... 51049.aspx
If you can wait until Exchange Server 2010 Service Pack 1 changes has been made so that DAC supports two-member DAGs in separate datacenters. DAC, or Datacenter Activation Coordination mode is a property setting for a database availability group (DAG). It enables control of the activation behavior of the DAG members preventing split-brain syndrom by not allowing databases to mount automatically even though the DAG has a quorum.
More information on DAC can be found here:
http://technet.microsoft.com/en-us/libr ... 79790.aspx
More information on datacenter switchovers can be found here:
http://technet.microsoft.com/en-us/libr ... 51049.aspx
If you can wait until Exchange Server 2010 Service Pack 1 changes has been made so that DAC supports two-member DAGs in separate datacenters. DAC, or Datacenter Activation Coordination mode is a property setting for a database availability group (DAG). It enables control of the activation behavior of the DAG members preventing split-brain syndrom by not allowing databases to mount automatically even though the DAG has a quorum.
More information on DAC can be found here:
http://technet.microsoft.com/en-us/libr ... 79790.aspx
Datacentre Activation Mode is a mode specifically for multsite Data
Availability Groups with 3 or more members. It is there to stop
datacentre DAG split brain syndrome.
For example you have 2 Sites with DAG members in each. Catastrophic errors occur and your WAN linking the two sites goes down. You now have a potential scenario where both sites will make a passive database active. The site that already had the active database, and the second site seeing the loss of the active database and automatically activating a copy.
so DAC operates this using literally a bit that it flips from either 0 or 1. 0 meaning it cannot mount a database and upon talking to other DAG members using DACP and finding another server with 1, will mount the databases as it knows it is allowed to.
For a more detailed explanation see here:
http://technet.microsoft.com/en-us/library/dd979790.aspx
DAC must be enabled manually if you are in a split datacentre scenario with 3 or more members. To see the cmdlet to activate again see:
http://technet.microsoft.com/en-us/library/dd979790.aspx
For example you have 2 Sites with DAG members in each. Catastrophic errors occur and your WAN linking the two sites goes down. You now have a potential scenario where both sites will make a passive database active. The site that already had the active database, and the second site seeing the loss of the active database and automatically activating a copy.
so DAC operates this using literally a bit that it flips from either 0 or 1. 0 meaning it cannot mount a database and upon talking to other DAG members using DACP and finding another server with 1, will mount the databases as it knows it is allowed to.
For a more detailed explanation see here:
http://technet.microsoft.com/en-us/library/dd979790.aspx
DAC must be enabled manually if you are in a split datacentre scenario with 3 or more members. To see the cmdlet to activate again see:
http://technet.microsoft.com/en-us/library/dd979790.aspx
Outlook Cant preview or open email attachments
Error opening attachments / Cleaning out the Temporary Outlook Files folder
When opening an attachment directly from within Outlook you could get an error message saying that it can’t create the file and to that you need check the permissions on the folder you want to save it in. In most cases the permissions on the folder isn’t the issue but the fact that the folder is “full”. When you open an attachment directly from within Outlook it will first save a copy to a subfolder of the Temporary Internet Files folder. Cleaning out the folder will solve the issue.
Outlook Secure Temp folder
Unfortunately this is easier said than done. The subfolder name Outlook creates (on installation of Outlook) in the Temporary Internet Files folder is quite random. In Outlook 2003 and previous, the name starts with OLK and is followed by up to 4 random numbers or letters. In Outlook 2007 and Outlook 2010, this folder is called Content.Outlook and then has a subfolder which is named with with 8 random numbers and letters. In addition, by default, you cannot simply browse to the folder to clean it out. Getting to the Temporary Outlook Folder can still be accomplished in 2 easy steps though.
Step 1: Locate the folder
The folder location is stored in the registry in the following key;
Outlook 97 HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Outlook\Security
Outlook 98 HKEY_CURRENT_USER\Software\Microsoft\Office\8.5\Outlook\Security
Outlook 2000 HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Security
Outlook 2002/XP HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Security
Outlook 2003 HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security
Outlook 2007 HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security
Outlook 2010 HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security
Step 2: Get to the folder
Open the OutlookSecureTempFolder registry key from the location provided in Step 1.
Copy the path from the key.
Open Explorer
Paste the address in the Address Bar and press Enter
and remove all files in that folder
should work then
When opening an attachment directly from within Outlook you could get an error message saying that it can’t create the file and to that you need check the permissions on the folder you want to save it in. In most cases the permissions on the folder isn’t the issue but the fact that the folder is “full”. When you open an attachment directly from within Outlook it will first save a copy to a subfolder of the Temporary Internet Files folder. Cleaning out the folder will solve the issue.
Outlook Secure Temp folder
Unfortunately this is easier said than done. The subfolder name Outlook creates (on installation of Outlook) in the Temporary Internet Files folder is quite random. In Outlook 2003 and previous, the name starts with OLK and is followed by up to 4 random numbers or letters. In Outlook 2007 and Outlook 2010, this folder is called Content.Outlook and then has a subfolder which is named with with 8 random numbers and letters. In addition, by default, you cannot simply browse to the folder to clean it out. Getting to the Temporary Outlook Folder can still be accomplished in 2 easy steps though.
Step 1: Locate the folder
The folder location is stored in the registry in the following key;
Outlook 97 HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Outlook\Security
Outlook 98 HKEY_CURRENT_USER\Software\Microsoft\Office\8.5\Outlook\Security
Outlook 2000 HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Security
Outlook 2002/XP HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Security
Outlook 2003 HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security
Outlook 2007 HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security
Outlook 2010 HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security
Step 2: Get to the folder
Open the OutlookSecureTempFolder registry key from the location provided in Step 1.
Copy the path from the key.
Open Explorer
Paste the address in the Address Bar and press Enter
and remove all files in that folder
should work then
Use Telnet on Port 25 to test SMTP communication
For purposes of providing an example, the following procedure uses the values that are described in the following list:
* Destination SMTP server mail1.fabrikam.com
* Source domain contoso.com
* Sender's e-mail address chris@contoso.com
* Recipient's e-mail address kate@fabrikam.com
* Message subject Test from Contoso
* Message body This is a test message
Bb123686.note(en-us,EXCHG.141).gifNote:
You should always use a valid sender e-mail address so that any non-delivery report (NDR) messages that are generated by the destination SMTP server are delivered to the sender of the message.
The commands in Telnet Client are not case-sensitive. The SMTP command verbs are capitalized for clarity.
1. At a command prompt, type telnet, and then press ENTER. This command opens the Telnet session.
2. Type set localecho and then press ENTER. This optional command lets you view the characters as you type them. This setting may be required for some SMTP servers.
3. Type set logfile <filename>. This optional command enables logging of the Telnet session to the specified log file. If you only specify a file name, the location of the log file is the current working directory. If you specify a path and a file name, the path must be local to the computer. Both the path and the file name that you specify must be entered in the Microsoft DOS 8.3 format. The path that you specify must already exist. If you specify a log file that doesn't exist, it will be created for you.
4. Type open mail1.fabrikam.com 25 and then press ENTER.
Bb123686.note(en-us,EXCHG.141).gifNote:
You can't use the backspace key after you have connected to the destination SMTP server within the Telnet session. If you make a mistake as you type an SMTP command, you must press ENTER and then type the command again. Unrecognized SMTP commands or syntax errors result in an error message that resembles the following:
500 5.3.3 Unrecognized command
5. Type EHLO contoso.com and then press ENTER.
6. Type MAIL FROM:chris@contoso.com and then press ENTER.
7. Type RCPT TO:kate@fabrikam.com NOTIFY=success,failure and then press ENTER. The optional NOTIFY command defines the particular delivery status notification (DSN) messages that the destination SMTP server must provide to the sender. DSN messages are defined in RFC 1891. In this case, you're requesting a DSN message for successful or failed message delivery.
8. Type DATA and then press ENTER. You will receive a response that resembles the following:
354 Start mail input; end with <CLRF>.<CLRF>
9. Type Subject: Test from Contoso and then press ENTER.
10. Press ENTER. RFC 2822 requires a blank line between the Subject: header field and the message body.
11. Type This is a test message and then press ENTER.
12. Press ENTER, type a period ( . ) and then press ENTER. You will receive a response that resembles the following:
250 2.6.0 <GUID> Queued mail for delivery
13. To disconnect from the destination SMTP server, type QUIT and then press ENTER. You will receive a response that resembles the following:
221 2.0.0 Service closing transmission channel
14. To close the Telnet session, type quit and then press ENTER.
* Destination SMTP server mail1.fabrikam.com
* Source domain contoso.com
* Sender's e-mail address chris@contoso.com
* Recipient's e-mail address kate@fabrikam.com
* Message subject Test from Contoso
* Message body This is a test message
Bb123686.note(en-us,EXCHG.141).gifNote:
You should always use a valid sender e-mail address so that any non-delivery report (NDR) messages that are generated by the destination SMTP server are delivered to the sender of the message.
The commands in Telnet Client are not case-sensitive. The SMTP command verbs are capitalized for clarity.
1. At a command prompt, type telnet, and then press ENTER. This command opens the Telnet session.
2. Type set localecho and then press ENTER. This optional command lets you view the characters as you type them. This setting may be required for some SMTP servers.
3. Type set logfile <filename>. This optional command enables logging of the Telnet session to the specified log file. If you only specify a file name, the location of the log file is the current working directory. If you specify a path and a file name, the path must be local to the computer. Both the path and the file name that you specify must be entered in the Microsoft DOS 8.3 format. The path that you specify must already exist. If you specify a log file that doesn't exist, it will be created for you.
4. Type open mail1.fabrikam.com 25 and then press ENTER.
Bb123686.note(en-us,EXCHG.141).gifNote:
You can't use the backspace key after you have connected to the destination SMTP server within the Telnet session. If you make a mistake as you type an SMTP command, you must press ENTER and then type the command again. Unrecognized SMTP commands or syntax errors result in an error message that resembles the following:
500 5.3.3 Unrecognized command
5. Type EHLO contoso.com and then press ENTER.
6. Type MAIL FROM:chris@contoso.com and then press ENTER.
7. Type RCPT TO:kate@fabrikam.com NOTIFY=success,failure and then press ENTER. The optional NOTIFY command defines the particular delivery status notification (DSN) messages that the destination SMTP server must provide to the sender. DSN messages are defined in RFC 1891. In this case, you're requesting a DSN message for successful or failed message delivery.
8. Type DATA and then press ENTER. You will receive a response that resembles the following:
354 Start mail input; end with <CLRF>.<CLRF>
9. Type Subject: Test from Contoso and then press ENTER.
10. Press ENTER. RFC 2822 requires a blank line between the Subject: header field and the message body.
11. Type This is a test message and then press ENTER.
12. Press ENTER, type a period ( . ) and then press ENTER. You will receive a response that resembles the following:
250 2.6.0 <GUID> Queued mail for delivery
13. To disconnect from the destination SMTP server, type QUIT and then press ENTER. You will receive a response that resembles the following:
221 2.0.0 Service closing transmission channel
14. To close the Telnet session, type quit and then press ENTER.
Exchange Web Services Managed API
http://msdn.microsoft.com/en-us/library ... 80%29.aspx
Videos:
http://msdn.microsoft.com/en-us/exchange/aa731546.aspx
http://msdn.microsoft.com/en-us/library ... 80%29.aspx
http://msdn.microsoft.com/en-us/library ... 80%29.aspx
Videos:
http://msdn.microsoft.com/en-us/exchange/aa731546.aspx
http://msdn.microsoft.com/en-us/library ... 80%29.aspx
http://msdn.microsoft.com/en-us/library ... 80%29.aspx
EXTEST_33788774A21E4 user is not there (Exchange Test User)
If the EXTEST_33788774A21E4 user is not there and needs to be to run the test-outlookconnectivity you need to do the following:
Then open Exchange Management Shell and navigate to the Scripts directory under where you installed Exchange, and run the new-TestCasConnectivityUser.ps1 script to recreate the mailbox-enabled user. It shouldn't matter that it creates a new mailbox; there shouldn't be any data in it that is of any importance.
Again, I don't think this will fix Outlook Anywhere, but it will allow you to test it.
Then open Exchange Management Shell and navigate to the Scripts directory under where you installed Exchange, and run the new-TestCasConnectivityUser.ps1 script to recreate the mailbox-enabled user. It shouldn't matter that it creates a new mailbox; there shouldn't be any data in it that is of any importance.
Again, I don't think this will fix Outlook Anywhere, but it will allow you to test it.
Content Index 'Failed' when mail server switch over
If this error occurs:
Error: "Content Index Catalog Files in the following state 'Failed'"
Do the following:
1. Suspend database copy
2. activate database copy: wait for the resync
It should work when status changed to HEALTHY and all indexes are ok.
Error: "Content Index Catalog Files in the following state 'Failed'"
Do the following:
1. Suspend database copy
2. activate database copy: wait for the resync
It should work when status changed to HEALTHY and all indexes are ok.
Exchange Restrict RAM
Incase u want to limit the size..Follow the steps below
1. Start ADSI Edit.
2. Open the following object:
Configuration/Services/Microsoft Exchange/Your organization/Administrative
Groups/Your administrative group/Servers/Server name/Information Store
3. Right-click Information Store, and then click Properties.
4. Under the list of Attributes, scroll down and select msExchESEParamCacheSizeMax.
5. Click the Edit button, then type the number of 8 kb pages that you
want to set the maximum cache size to.
For example. 1GB cache equates to 1048576 (1024x1024). Divide the cache that you want to set by 8kb to determine the value to enter.
6. Quit ADSI Edit, and then restart the Microsoft Exchange Information Store service
1. Start ADSI Edit.
2. Open the following object:
Configuration/Services/Microsoft Exchange/Your organization/Administrative
Groups/Your administrative group/Servers/Server name/Information Store
3. Right-click Information Store, and then click Properties.
4. Under the list of Attributes, scroll down and select msExchESEParamCacheSizeMax.
5. Click the Edit button, then type the number of 8 kb pages that you
want to set the maximum cache size to.
For example. 1GB cache equates to 1048576 (1024x1024). Divide the cache that you want to set by 8kb to determine the value to enter.
6. Quit ADSI Edit, and then restart the Microsoft Exchange Information Store service
Subscribe to:
Posts (Atom)


