Archive

Archive for the ‘Exchange 2010’ Category

How to setup FPE content filter to block Outlook blocked Senders

November 28, 2011 Leave a comment

I have been busy late on my rather big project and learnt something today!!

I was confused as to why FPE does not assign SCL ratings between 1 and 4, intact any messages that are between those values get assigned a value of –1. this got me a little confused when i was monitoring the system to see how it was working.

more info on Content Filtering here

It then occurred to me would blocked senders work. It turns out after some digging I had to use a Extended Option to turn this on.

From the FPR Management Shell

New-FseExtendedOption –Name CFAllowBlockedSenders –Value true

 

image

 

I suspect I will post more useless info on this subject as I tweak the system sorry!!

Advertisements

The Exchange Team does it again.

June 20, 2011 3 comments

So I am continually amazed how the Exchange team keeps
surprising me with giving its customers and users more and more features and
tools.

For the last, what 5 years or so I have been working with
the Exchange team in various ways and in that time I had one of my favourite tools,
the “Exstat” tool which was a tool written by Paul Bowden specifically for the
Exchange TAP programme way back in time!! It has been used, updated and kept
alive by the team ever since, WHY? Because it was a fantastic tool for informaing
both the administrator and TAP team what was deployed in the network etc.

I have used it ever since I first got my hands on it, anyway
back to the point I was reading Steve Goodmans Exchange blogs (http://www.stevieg.org/2011/06/exchange-environment-report/)
this morning as I have many blogs post to catch up on. To find Microsoft has
only gone and provided it to the masses J
please try this especially if you have a number of Exchange boxes, it can sometimes
really useful.

From the looks of it this script is providing exactly the same as the one the TAP
participants received. Next time I get time in my lab I am going to have to give this a whirl and see how easy it is going to be to modify (only slightly).

 

 

 

 

The Exchange Mailbox Server Calculator

I was just catching up on various blogs this morning and listening to Greg Taylor via TechEd online http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/EXL326

Greg was talking about some new features in the up coming Service Pack 2 for Exchange 2010 which includes Address book Policies which I know will be a welcome addition to many. Once I finished that I took a look at the Exchange blog to find another nugget of useful information….

Ross Smith for a long time has created and continually developed the Mailbox Server Requirement Calculator which gave you all the information you needed to design and resource your Exchange Mailbox server deployments, I recall over a year ago (probably over 2) talking to Ross and saying this was a fantastic tool but it was missing one thing for me and that was the database distribution, it always made my head hurt for a while designing any large deployment. I don’t recall Ross’s exact words but I am sure it was something like yeah good luck with that!! Smile but he has done it Smile not only that he has gone further and even provide scripts to create the copies with the activation preferences.

Shame this was not around over the last three months for me would have been really useful.

You can find it over here (as usual) http://blogs.technet.com/b/exchange/archive/2011/05/18/the-mailbox-server-role-requirements-calculator-now-with-database-copy-distribution.aspx

I can’t wait to see what he does next.

Categories: Exchange 2010

Get Alias and Mailbox Size

May 21, 2011 2 comments

Over the past few weeks, I have had a job sitting in my list of things to do which I was struggling to get done. I was asked to produce a list of Exchange 2007 users alias and mailbox sizes so they could plan  batches of user migrations.

I found it difficult to actually get the alias and mailbox size, I found numerous orf scripts and post that I thought were going to work but none of them did. Along comes my good Friend Gavin to the rescue with the below code. What made me laugh was every other script had half a page of code and Gavins version only a few. His blog can be found http://gavinwoodall.wordpress.com

Put the below in a PS.1 file and give it a whirl.

$userlist = get-mailboxdatabase -server <Servername> | get-mailbox

foreach ($user in $userlist)

{

$useralias = $user.alias

write-host $useralias

$usermbsize = Get-MailboxStatistics $user.displayname | select-object TotalItemSize

$usermbsize = $usermbsize.totalitemsize.value.toMB()

$out = $useralias + “,” + $usermbsize + “,” + $user.displayname

write-host $out

$Out | Out-File C:\ptusers.csv -Append

}

Categories: Exchange 2010

Exchange 2010 error when adding or removing a database copy

January 11, 2011 1 comment

If you have upgraded your DAG from Exchange 2010 RTM to SP1 you may find yourself in a position where you try and add or remove a database copy from a DAG member and you get the follow error.

[PS] C:\WINDOWS\system32>Add-MailboxDatabaseCopy -identity "MBX-0007" -mailboxServer "MBX01" -ActivationPreference 3
WARNING: An unexpected error has occurred and a Watson dump is being generated: Registry key has subkeys and recursive removes
are not supported by this method.
Registry key has subkeys and recursive removes are not supported by this method.
    + CategoryInfo          : NotSpecified: (:) [Add-MailboxDatabaseCopy], InvalidOperationException
    + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.Exchange.Management.SystemConfigurationTasks.AddMailboxDatabaseCopy

 

SNAGHTML1df4488

If you do find yourself in this position you can easily resolve this by removing the DumpsterInfo key for the database copy in the registry of the server you are trying to add or remove.

1.you need to establish the GUID of the database by running the below in a EMS session:

Get-MailboxDatabase MBX-007 | fl name,GUID

Which will return something like:

SNAGHTML20496ec

2. Then on the server where you are trying to either add or remove the copy open regedit and navigate to the path below and delete the DumpsterInfo key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\Replay\State\{DB-GUID}\DumpsterInfo

SNAGHTML201dd00

Categories: Exchange 2010

Searching IIS Log Files

November 11, 2010 Leave a comment

So today I had a scenario where certain options in ECP were not loading in the browser, all we would get would be a spinning wheel, of great so I needed to search the logs for my user account to try and identify what’s going on. I used the below command in PowerShell to retrieve the data, I am sure they maybe a much better way of doing this across a number of CAS servers, if you know a way please let me know Smile

 

Select-string –path \\server\C$\inetpub\logs\logfiles\w3svc1\log1.log –pattern “myname” > c:\export.txt

Categories: Exchange 2010

Exchange 2003, 2007 and 2010 URLs

November 11, 2010 Leave a comment

So I am in the process of rebuilding my Exchange/OCS labs and I plan on probably rebuilding them a few times, so I have been working on a few things to streamline the builds and configuration, one of the tools I have been using over the years was a nice script put together by Stale Hansen and a few merry men. the script when run will present you with a number of options allowing you to set URLs for Exchange 2010, 2007 and the Exchange 2003 legacy URL, simple tasks but it is little tools like this that make my days easier allowing to to spend more time with Call of Duty Smile.

Below is the PowerShell script which can be found on Stale’s blog here http://msunified.net/2010/05/07/script-for-configuring-exchange-2010-internal-and-external-urls/ or a direct link http://msunified.net/exchange-downloads/script-internalexternalurls-ps1/

 

####################################################################################################
# Set-InternalExternalURLs.ps1
#
# v03 May2010 by Ståle Hansen (http://msunified.net)
#
# Idea from MVP’s Anderson Patricio and Pat Richard, script designed for Exchange 2010 prerequisites
# Thanks to Marjus Sirvinsks for adapting the script further
#
####################################################################################################
[System.Console]::ForegroundColor = [System.ConsoleColor]::White
clear-host

    write-host
    write-host Script for setting Internal and External URLs on Exchange 2007/2010
    write-host
    write-host Please choose one of the following:
    write-host
    write-host ‘1) Exchange 2010 Internal URLs’
    write-host ‘2) Exchange 2010 External URLs’
    write-host ‘3) Exchange 2007 Internal URLs’
    write-host ‘4) Exchange 2007 External URLs’
    write-host ‘5) Exchange 2003 Legacy URL’
    write-host ‘6) List Current URL Config’
    write-host ‘7) Cancel’ -ForegroundColor Red
    write-host
    $opt = Read-Host "Select an option [1-7]"

switch ($opt)    {

1{
# Set Exchange 2010 Internal URLs using Client Access Arrays in correct sites

Write-Warning "Exchange 2010 Internal URLs requires that a ClientAccessArray is created"

Foreach($Server in Get-ClientAccessServer | Get-ExchangeServer | where-object {$_.AdminDisplayVersion.Major -eq 14}){
$CASserver = $Server.Identity
$ADsite = Get-ExchangeServer $Server
$site = $ADsite.site
$urlpath = Get-ClientAccessArray | where-object {$_.site -eq $site}
$casarray = $urlpath.fqdn

Write-Host
Write-Host "Found Exchange 2010 Client Access Server " -NoNewLine
Write-Host $CASserver -NoNewLine -Foregroundcolor Green
Write-Host " in ADsite " -NoNewLine
Write-Host $site -Foregroundcolor Green

Write-Host "Client Access Array is resolved to " -NoNewLine
Write-Host $casarray -NoNewLine -foregroundcolor Green
Write-Host " in ADsite " -NoNewLine
Write-Host $site -foregroundcolor Green
Write-Host "Will use " -NoNewLine
Write-Host https://$casarray -NoNewLine -foregroundcolor Green
Write-Host " as InternalUrl on this server"

}

Write-Host
Write-Host "Press " -NoNewLine
Write-Host "Enter" -NoNewLine -foregroundcolor Green
Write-Host " to continue, or " -NoNewLine
Write-Host "CTR+C " -NoNewLine -foregroundcolor Red
Write-Host "to cancel"
[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray
Read-Host
[System.Console]::ForegroundColor = [System.ConsoleColor]::White

Foreach($Server in Get-ClientAccessServer | Get-ExchangeServer | where-object {$_.AdminDisplayVersion.Major -eq 14}){
$CASserver = $Server.Identity
$ADsite = Get-ExchangeServer $Server
$site = $ADsite.site
$urlpath = Get-ClientAccessArray | where-object {$_.site -eq $site}
$casarray = $urlpath.fqdn

Get-AutodiscoverVirtualDirectory -Server $CASserver | Set-AutodiscoverVirtualDirectory –InternalUrl "https://$casarray/Autodiscover/Autodiscover.xml"
Get-ClientAccessServer -Identity $CASserver | Set-ClientAccessServer –AutodiscoverServiceInternalUri "https://$casarray/Autodiscover/Autodiscover.xml"
Get-WebservicesVirtualDirectory -Server $CASserver | Set-WebservicesVirtualDirectory –InternalUrl "https://$casarray/Ews/Exchange.asmx"
Get-OabVirtualDirectory -Server $CASserver | Set-OabVirtualDirectory –InternalUrl "https://$casarray/Oab"
Get-OwaVirtualDirectory -Server $CASserver | Set-OwaVirtualDirectory –InternalUrl "https://$casarray/Owa"
Get-EcpVirtualDirectory -Server $CASserver | Set-EcpVirtualDirectory –InternalUrl "https://$casarray/Ecp"
Get-ActiveSyncVirtualDirectory -Server $CASserver | Set-ActiveSyncVirtualDirectory -InternalUrl "https://$casarray/Microsoft-Server-ActiveSync"
}

#Get commands to doublecheck the config
[System.Console]::ForegroundColor = [System.ConsoleColor]::White

Get-AutodiscoverVirtualDirectory | ft Identity,InternalUrl
Get-ClientAccessServer | ft Identity,AutodiscoverServiceInternalUri
Get-WebservicesVirtualDirectory | ft Identity,InternalUrl
Get-OabVirtualDirectory | ft Identity,InternalUrl
Get-OwaVirtualDirectory | ft Identity,InternalUrl
Get-EcpVirtualDirectory | ft Identity,InternalUrl
Get-ActiveSyncVirtualDirectory | ft Identity,InternalUrl

[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray

}

2{
# Set external URL on all Exchange 2010 Client Access Servers using input

Foreach($Server in Get-ClientAccessServer | Get-ExchangeServer | where-object {$_.AdminDisplayVersion.Major -eq 14}){
$CASserver = $Server.Identity
$ADsite = Get-ExchangeServer $Server
$site = $ADsite.site

Write-Host
Write-Host "Found Exchange 2010 Client Access Server " -NoNewLine
Write-Host $CASserver -NoNewLine -Foregroundcolor Green
Write-Host " in ADsite " -NoNewLine
Write-Host $site -Foregroundcolor Green
Write-Host

}

$urlpath = Read-Host "Type external FQDN for Exchange 2010 Client Access"
Write-Host "Will set ExternalUrl as " -NoNewLine
Write-Host "https://$urlpath/" -NoNewLine -foregroundcolor Green
Write-Host " on all Exchange 2010 Client Access Servers"

Write-Host
Write-Host "Press " -NoNewLine
Write-Host "Enter" -NoNewLine -foregroundcolor Green
Write-Host " to continue, or " -NoNewLine
Write-Host "CTR+C " -NoNewLine -foregroundcolor Red
Write-Host "to cancel"
[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray
Read-Host
[System.Console]::ForegroundColor = [System.ConsoleColor]::White

Foreach($Server in Get-ClientAccessServer | Get-ExchangeServer | where-object {$_.AdminDisplayVersion.Major -eq 14}){
$CASserver = $Server.Identity

Get-AutodiscoverVirtualDirectory -Server $CASserver | Set-AutodiscoverVirtualDirectory –ExternalUrl "https://$urlpath/Autodiscover/Autodiscover.xml"
Get-webservicesVirtualDirectory -Identity $CASserver | Set-webservicesVirtualDirectory –ExternalUrl "https://$urlpath/Ews/Exchange.asmx"
Get-OabVirtualDirectory -Server $CASserver | Set-OabVirtualDirectory –ExternalUrl "https://$urlpath/Oab"
Get-OwaVirtualDirectory -Server $CASserver | Set-OwaVirtualDirectory –ExternalUrl "https://$urlpath/Owa"
Get-EcpVirtualDirectory -Server $CASserver | Set-EcpVirtualDirectory –ExternalUrl "https://$urlpath/Ecp"
Get-ActiveSyncVirtualDirectory -Server $CASserver | Set-ActiveSyncVirtualDirectory -ExternalUrl "https://$urlpath/Microsoft-Server-ActiveSync"
}

#Get commands to doublecheck the config
[System.Console]::ForegroundColor = [System.ConsoleColor]::White

Get-AutodiscoverVirtualDirectory | ft Identity,ExternalUrl
Get-webservicesVirtualDirectory | ft Identity,ExternalUrl
Get-OabVirtualDirectory | ft Identity,ExternalUrl
Get-OwaVirtualDirectory | ft Identity,ExternalUrl
Get-EcpVirtualDirectory | ft Identity,ExternalUrl
Get-ActiveSyncVirtualDirectory | ft Identity,ExternalUrl

[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray

}

3{
# Set Exchange 2007 Internal URLs using input

Foreach($Server in Get-ClientAccessServer | Get-ExchangeServer | where-object {$_.AdminDisplayVersion.Major -lt 14}){
$CASserver = $Server.Identity
$ADsite = Get-ExchangeServer $Server
$site = $ADsite.site

Write-Host
Write-Host "Found Exchange 2007 Client Access Server " -NoNewLine
Write-Host $CASserver -NoNewLine -Foregroundcolor Green
Write-Host " in ADsite " -NoNewLine
Write-Host $site -Foregroundcolor Green
Write-Host

}

Write-Host "Type internal FQDN for Exchange 2007 Client Access"
Write-Host "Please type http:// or https:// in front: " -NoNewLine -foregroundcolor Yellow
$urlpath = Read-Host
Write-Host
Write-Host "Will set InternalUrl as " -NoNewLine
Write-Host "$urlpath/" -NoNewLine -foregroundcolor Green
Write-Host " on all Exchange 2007 Client Access Servers"

Write-Host
Write-Host "Press " -NoNewLine
Write-Host "Enter" -NoNewLine -foregroundcolor Green
Write-Host " to continue, or " -NoNewLine
Write-Host "CTR+C " -NoNewLine -foregroundcolor Red
Write-Host "to cancel"
[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray
Read-Host
[System.Console]::ForegroundColor = [System.ConsoleColor]::White

Foreach($Server in Get-ClientAccessServer | Get-ExchangeServer | where-object {$_.AdminDisplayVersion.Major -lt 14}){
$CASserver = $Server.Identity

Get-AutodiscoverVirtualDirectory -Server $CASserver | Set-AutodiscoverVirtualDirectory –InternalUrl "$urlpath/Autodiscover/Autodiscover.xml"
Get-ClientAccessServer -Identity $CASserver | Set-ClientAccessServer –AutodiscoverServiceInternalUri "$urlpath/Autodiscover/Autodiscover.xml"
Get-WebservicesVirtualDirectory -Server $CASserver | Set-WebservicesVirtualDirectory –InternalUrl "$urlpath/Ews/Exchange.asmx"
Get-OabVirtualDirectory -Server $CASserver | Set-OabVirtualDirectory –InternalUrl "$urlpath/Oab"
Get-OwaVirtualDirectory -Identity "$CASserver\OWA (Default Web site)"  | Set-OwaVirtualDirectory –InternalUrl "$urlpath/Owa"
Get-ActiveSyncVirtualDirectory -Server $CASserver | Set-ActiveSyncVirtualDirectory -InternalUrl "$urlpath/Microsoft-Server-ActiveSync"
}

#Get commands to doublecheck the config
[System.Console]::ForegroundColor = [System.ConsoleColor]::White

Get-AutodiscoverVirtualDirectory | ft Identity,InternalUrl
Get-ClientAccessServer | ft Identity,AutodiscoverServiceInternalUri
Get-WebservicesVirtualDirectory | ft Identity,InternalUrl
Get-OabVirtualDirectory | ft Identity,InternalUrl
Get-OwaVirtualDirectory | ft Identity,InternalUrl
Get-ActiveSyncVirtualDirectory | ft Identity,InternalUrl

[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray

}

4{
# Set external URL on Exchange 2007 Client Access Servers using input

Foreach($Server in Get-ClientAccessServer | Get-ExchangeServer | where-object {$_.AdminDisplayVersion.Major -lt 14}){
$CASserver = $Server.Identity
$ADsite = Get-ExchangeServer $Server
$site = $ADsite.site

Write-Host
Write-Host "Found Exchange 2007 Client Access Server " -NoNewLine
Write-Host $CASserver -NoNewLine -Foregroundcolor Green
Write-Host " in ADsite " -NoNewLine
Write-Host $site -Foregroundcolor Green
Write-Host
}

$urlpath = Read-Host "Type external FQDN for Client Access"
Write-Host "Will set ExternalUrl as " -NoNewLine
Write-Host "https://$urlpath/" -NoNewLine -foregroundcolor Green
Write-Host " on all Exchange 2007 Client Access Servers"

Write-Host
Write-Host "Press " -NoNewLine
Write-Host "Enter" -NoNewLine -foregroundcolor Green
Write-Host " to continue, or " -NoNewLine
Write-Host "CTR+C " -NoNewLine -foregroundcolor Red
Write-Host "to cancel"
[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray
Read-Host
[System.Console]::ForegroundColor = [System.ConsoleColor]::White

Foreach($Server in Get-ClientAccessServer | Get-ExchangeServer | where-object {$_.AdminDisplayVersion.Major -lt 14}){
$CASserver = $Server.Identity

Get-AutodiscoverVirtualDirectory -Server $CASserver | Set-AutodiscoverVirtualDirectory –ExternalUrl "https://$urlpath/Autodiscover/Autodiscover.xml"
Get-webservicesVirtualDirectory -Server $CASserver | Set-webservicesVirtualDirectory –ExternalUrl "https://$urlpath/Ews/Exchange.asmx"
Get-OabVirtualDirectory -Server $CASserver | Set-OabVirtualDirectory –ExternalUrl "https://$urlpath/Oab"
Get-OwaVirtualDirectory -Identity "$CASserver\OWA (Default Web site)" | Set-OwaVirtualDirectory –ExternalUrl "https://$urlpath/Owa"
Get-ActiveSyncVirtualDirectory -Server $CASserver | Set-ActiveSyncVirtualDirectory -ExternalUrl "https://$urlpath/Microsoft-Server-ActiveSync"

}

#Get commands to doublecheck the config
[System.Console]::ForegroundColor = [System.ConsoleColor]::White

Get-AutodiscoverVirtualDirectory | ft Identity,ExternalUrl
Get-webservicesVirtualDirectory | ft Identity,ExternalUrl
Get-OabVirtualDirectory | ft Identity,ExternalUrl
Get-OwaVirtualDirectory | ft Identity,ExternalUrl
Get-ActiveSyncVirtualDirectory | ft Identity,ExternalUrl

[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray

}

5{
$legacy = Read-Host "For Legacy Exchange 2003 coexistence, type external FQDN"
Write-Host "Will use" -NoNewLine
Write-Host " https://$legacy/Exchange" -NoNewLine -foregroundcolor Green
Write-Host " as Exchange 2003 URL on all Exchange 2010 Client Access Servers"

Write-Host
Write-Host "Press " -NoNewLine
Write-Host "Enter" -NoNewLine -foregroundcolor Green
Write-Host " to continue, or " -NoNewLine
Write-Host "CTR+C " -NoNewLine -foregroundcolor Red
Write-Host "to cancel"
[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray
Read-Host
[System.Console]::ForegroundColor = [System.ConsoleColor]::White

Foreach($Server in Get-ClientAccessServer | Get-ExchangeServer | where-object {$_.AdminDisplayVersion.Major -eq 14}){
$CASserver = $Server.Identity

Get-OwaVirtualDirectory -Server $CASserver | Set-OwaVirtualDirectory –Exchange2003Url "https://$legacy/Exchange"

}

#get command to doublecheck the config
[System.Console]::ForegroundColor = [System.ConsoleColor]::White

Get-OwaVirtualDirectory | ft Identity,Exchange2003Url

[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray

}

6{
# Display current Exchange Internal and External URL configuration
# Testing if Exchange 2010 servers present, if not dont display ECP else display with ECP

$Server = Get-ClientAccessServer | Get-ExchangeServer | where-object {$_.AdminDisplayVersion.Major -eq 14}
if ($server -eq $Null){

# No Exchange 2010 servers present

Get-AutodiscoverVirtualDirectory | fl Identity,InternalUrl,ExternalUrl
Get-ClientAccessServer | fl Identity,AutodiscoverServiceInternalUri
Get-WebservicesVirtualDirectory | fl Identity,InternalUrl,ExternalUrl
Get-OabVirtualDirectory | fl Identity,InternalUrl,ExternalUrl
Get-OwaVirtualDirectory | fl Identity,InternalUrl,ExternalUrl
Get-ActiveSyncVirtualDirectory | fl Identity,InternalUrl,ExternalUrl

[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray
}
else{

# Exchange 2010 servers present

Get-AutodiscoverVirtualDirectory | fl Identity,InternalUrl,ExternalUrl
Get-ClientAccessServer | fl Identity,AutodiscoverServiceInternalUri
Get-WebservicesVirtualDirectory | fl Identity,InternalUrl,ExternalUrl
Get-OabVirtualDirectory | fl Identity,InternalUrl,ExternalUrl
Get-OwaVirtualDirectory | fl Identity,InternalUrl,ExternalUrl,Exchange2003Url
Get-EcpVirtualDirectory | fl Identity,InternalUrl,ExternalUrl
Get-ActiveSyncVirtualDirectory | fl Identity,InternalUrl,ExternalUrl

[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray

}
}

7{

[System.Console]::ForegroundColor = [System.ConsoleColor]::Gray

}
        }