Archive

Archive for the ‘Exchange 2007’ 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!!

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

}
        }

How to restart Exchange Services from PowerShell

September 21, 2010 Leave a comment

So I have been using Test-ServiceHealth a lot recently as one of our services keeps crashing, and I have found the quickest and easiest method of starting services is…….

Test-ServiceHealth | Select-Object -Expand ServicesNotRunning | Start-Service

Just a reminder for me as I am rubbish at PowerShell and maybe something helpful for you.

A fantastic site

December 25, 2008 Leave a comment

I have just found a really great site, it looks like it is in it’s early days, but Brian (Exchange Genie) and others have created a site where they are creating technical demos for Exchange.

I am currently watching Brian’s on OAB, found here it is a easy watch and explains everything you would want to known on OAB generation in a format that is perfect for someone wanting to learn about Exchange and more advanced admins wanting to explore more features in depth.

Good work guys, I look forward to seeing what you come out with next

Brian… that’s not your voice is it? or have you tweaked it…………. no that’s not you am I being cheated 🙂

Here is the site itself http://www.exclusivelyexchange.com

Exchange 2007 SP1 Rollup 2

I have arrived in Kent for a relaxing couple of days, and I have just noticed that MS has released SP1 Rollup2 for Exchange 2007. You can download it from here

Some Highlights:

Categories: Exchange 2007