Create beautiful reports of your Exchange environment using Powershell

Steve Goodman of stevieg.org has created a script that would give you a visual overview of your Exchange environment. The script generates a report that gives you an overview of your environment, Exchange 2003, 2007, 2010 servers and database availability groups – in particular:

  • Total Servers per Exchange version & service pack
  • Total Mailboxes per Exchange version & service pack
  • Totals for Exchange roles across the environment
  • A site-by-site breakdown for the following:
    • Mailboxes per site
    • Exchange servers, version, update rollup  and version, service level, highlighted installed roles, OS version and service pack
  • A breakdown of each Database Availability Group including:
    • DAG name, member count and member list
    • Database information such as
      • Name
      • Mailboxes per database and Average Size
      • Archive mailboxes per database and Average Size - only shown if a DB includes Archive mailboxes
      • Database and whitespace size
      • Database and log disk free space percentage
      • Last full backup date/time (new) – only shown if at least one DAG DB has had a full backup
      • Circular Logging state (new) - only shown if at least one DAG DB has circular logging enabled
      • Server hosting the active copy
      • List of servers hosting copies and copy count
  • A breakdown of Non-DAG databases including Exchange 2007 and 2003 DBs, including the database information above, along with Storage Group name (where applicable).

The script doesn’t support detailed information about Exchange 2007/2003 CCR/SCC clusters, but these are shown as ClusMBX in the output. At the moment, the script doesn’t show Public Folder information.

Head over to his site for downloading the script and for usage instructions.

- Thanks, Jinesh.

//

2011 in review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 10,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 4 sold-out performances for that many people to see it.

Click here to see the complete report.

//

Exchange 2010 Powershell Cheat Sheet

Matt Abraham has created a “Cheat Sheet” with a list of some of the most important Exchange 2010 PowerShell Cmdlets. A lot of these can be used with Exchange 2007 as well!

The post on OpsVault has the download link.

 

- Thanks, Jinesh.

//

Checking for the existence of a string in a file using Powershell

Using the Select-String Cmdlet, you can determine whether or not a specific string value exists in a text file. PowerShell will return each line in the text file that includes the target string. You can add the -quiet parameter to get back a True if the string is found and nothing if the string is not found. Another Select-String parameter that you might find useful is -casesensitive, which performs a case-sensitive search.

Following is a crude script I wrote to find the existence of three strings in Edgetransport.exe.config file on multiple Hub transport servers. It basically searches for the string in the file, compares it with a standard value and returns a ‘Match’ or ‘No match’ according to what it found.

$CheckServers = Get-Content Servers.txt
foreach( $CSrv in $CheckServers )
    {
    Write-host $Csrv -fore cyan
    $config = get-content “\\$CSrv\D$\Program Files\Microsoft\Exchange Server\Bin\Edgetransport.exe.config”
    $Ver1 = $config | Select-String “EnableResourceMonitoring”
    $Ver2 = ‘    <add key=”EnableResourceMonitoring” value=”True” />’
    if ($ver1 -like $ver2)
        {write-host Match -fore green}
    Else
        {write-host No Match -fore red}
    $Wer1 = $config | Select-String “DatabaseCheckPointDepthMax”
    $Wer2 = ‘    <add key=”DatabaseCheckPointDepthMax” value=”536870912″ />’
    if ($Wer1 -like $Wer2)
        {write-host Match -fore green}
    Else
        {write-host No Match -fore red}
    $Xer1 = $config | Select-String “DatabaseMaxCacheSize”
    $Xer2 = ‘    <add key=”DatabaseMaxCacheSize” value=”1073741824″ />’
    if ($Xer1 -like $Xer2)
        {write-host Match -fore green}
    Else
        {write-host No Match -fore red}
    Write-host
    write-host “Press any key to check next server”
    write-host “”
    $x = $host.UI.RawUI.ReadKey(“NoEcho,IncludeKeyDown,AllowCtrlC”)
    }

To run the script, create a file called Servers.txt, populate it with server names, save the code given above to a .ps1 file and run the .ps1 file.

- Thanks, Jinesh.

Lesser known Powershell keyboard shortcuts

Here you go.

Page Up – Jumps to the first command in the command history buffer.

Page Down – Jumps to the last command in the history buffer.

Ctrl + Left Arrow – Goes to the left one word at a time.

Ctrl + Right Arrow – Goes to the right one word at a time.

F7 – Shows command history buffer. You can use the up and down arrow keys to navigate the buffer and press Enter to select the command. You can also press F9 and select a command by its number.

Ctrl + Home – Deletes all the characters at the current position up to the beginning of the line. Characters to the right of the current position, if any, remain intact.

Ctrl + End – Deletes everything from the current position up to the end of the line.

Alt +F7 – Clears the command history and start you off with a new list.

Character + (F8) – Shows all the commands you’ve entered that begin with the ‘Character’, one by one. For example, G +F8 will show you commands you’ve entered that begin with a ‘G’.

 

- Thanks, Jinesh.

//

Configure Automatic Replies for a user (OOF) from Exchange 2010 Server.

Yes, you can now configure Out Of Office replies for a user directly from the server – without having to grant yourself permission and access user’s mailbox. You can configure auto-reply options either using the Exchange Control Panel or using the Shell.

You can also manage Inbox Rules for your users using *-InboxRule cmdlets:

- Get-InboxRule
- Set-InboxRule
- New-InboxRule
- Remove-InboxRule
- Enable-InboxRule
- Disable-InboxRule

Read the post on Exchange Team Blog.

-Thanks, Jinesh.

Good read: Moving a database between DAGs

Tony Redmond, in his post, discusses the available options for moving a database between DAGs. “Though the unbreakable connection that exists in all previous versions of Exchange to tie a database to a specific server no longer exists”, he says, “the notion of a totally portable database is not yet implemented.”

He gives a couple of options to accomplish the task of moving the database. One is to use the move mailbox function to move all the mailboxes from the database to a database or databases in the second DAG. However, this is not easy for large number of mailboxes or for moving multiple databases between DAGs. The second idea, proposed by Tim McMichael of Microsoft, is that it would be possible to use a “swing server” to transport the database from one DAG to another.

Steps involved would be:

  • Commission a specific mailbox server and introduce it into the first DAG.
  • Transfer a copy of the mailbox database to be transferred to that server and make it active.
  • Remove all other copies of the mailbox database so that the only copy is now present on the swing server.
  • Remove the swing server from the first DAG and add it to the second DAG before completing the process by creating whatever number of additional copies of the database are necessary in the second DAG.
  • Finally, you remove the copy of the database from the swing server and remove it from the second DAG.

Obviously, there are some downsides to the swing server technique. First, it requires additional hardware. Second, there will be a time when the mailbox database (or databases) lose redundancy as you have to reduce them to just one copy before it’s possible to move between DAGs. The redundancy can be reintroduced as soon as the databases join the second DAG but even so, it will take time for the copies to be seeded. Last, this is a moderately complex multi-step technique.

Which method to use will be your call depending on the situation.

Read the full post

-Thanks, Jinesh.

 

Upcoming PST Capture tool that can search, import and destroy PST files

Microsoft has announced a new tool, PST Capture, which will be downloadable and free, and will enable you to discover .pst files on your network and then import them into both Exchange Online (in Office 365) and Exchange Server 2010 on-premises (in your Company servers). Interesting part is that the tool can, optionally, destroy the discovered PST files.

Bharat Suneja has a post about the tool, where he also discusses how importing and exporting .PST files evolved over the years.

- Thanks, Jinesh.

The History of Email [INFOGRAPHIC]

While Evolution Of Email [Infographic] had a lot of interesting stuff like it all started as early as 1965 to Microsoft Outlook for DOS, The History of Email brings more things like Queen Elizabeth II became the first head of state to send an email and Homer Simpson’s email address.

Click image to see larger version.

Source

-Thank, Jinesh.

Ten Email criteria every company should consider

Taken from How to Choose the Right Email Solution for your Business.

-Thanks, Jinesh.

Follow

Get every new post delivered to your Inbox.

Join 58 other followers