Creating test accounts for SCOM on Split Permissions

Problem

Trying to run the new-TestCasConnectivityUser.ps1 raises an error claiming that the password is not complex enough, or that the OU does not exist:

 SNAGHTML157f62b9

Continue reading “Creating test accounts for SCOM on Split Permissions”

Exchange 2010 Dag won’t go online

Problem

After installation of Exchange 2010 SP1 Rollup5 I discovered that one of my networks was listed as partitioned in EMC. I ran several test without being able to find a cause for this. I am able to ping the addresses both ways, and there are no routes from network 1 to network 2. I even ran “Validate this cluster” (network only) successfully. Further investigation established that the cluster core resources were offline as well:

SNAGHTML5c562012

After a lot of fruitless searching I came across this Technet blog: http://blogs.technet.com/b/timmcmic/archive/2010/05/12/cluster-core-resources-fail-to-come-online-on-some-exchange-2010-database-availability-group-dag-nodes.aspx , who describes this situation and how to resolve it. But it also claims that the error is fixed in SP1. Since I’ve been at SP1 since installation I was skeptical, but I tried it anyway. As I suspected it didn’t help, but a comment from MattP_75 put me on the right track to a solution.

The problem is related to one or both of the networks not allowing client connections. I even found it in the eventlog, event 1223 from FailoverClustering.

SNAGHTML5c5c3660image

When I tried to change it in Failover Cluster management as the event suggested, it just bounced back to not allowing client access. To get it to stick, I had to change it in the registry.

I have no idea why this happens, but several of the comments on the article mentioned above talk about backup agents, mostly backup exec which I don’t have on my servers.

Solution

This is what I did to resolve the issue:

  • Shut down one of the nodes to ensure quorum
  • Change the role value to 3 on all cluster networks
    image
  • Get the core resources online
  • Restart the other node
  • Check the registry on both nodes to verify

I have had this happen again when I restart the cluster node that is hosting the Public Folders database, but it doesn’t happen every time.

Update 2011.11.23:

Microsoft recently released a hotfix which might be related to this error, kb2550886. According to the Exchange Team blog this is highly recommended for Exchange DAG’s running on Windows 2008R2, and they describe a scenario resembling the problem mentioned above. I have not verified that this update solves the problem permanently, but it is most certainly worth installing at your earliest convenience if you haven’t done so already.

Mailbox database status script

For Exchange 2010.

Current functions:

  • Find database copies with failed content index
  • Fix database copies with failed content index
  • List active database copies
  • List passive database copies
  • List backup status

This script keeps returning to the main menu until exit is selected.

Use at your own risk. Don’t blame me if something goes horribly wrong.

 

The script

#Main logic
function main
{
	$menucolor = [System.ConsoleColor]::white
	write-host '-------------------------------------------------------------------'-ForegroundColor $menucolor
	write-host '|                     Mailbox database status                     |'-ForegroundColor $menucolor
	write-host '|                      Jan Kåre Lokna                          |'-ForegroundColor $menucolor
	write-host '|                     v 1.2                                       |'-ForegroundColor $menucolor
	write-host '-------------------------------------------------------------------'-ForegroundColor $menucolor
	write-host 
	write-host '** MENU **' -ForegroundColor $menucolor
	write-host '1) Find database copies with failed ContentIndex State' -ForegroundColor $menucolor
	write-host '2) Check backup status' -ForegroundColor $menucolor
	write-host '3) Find active database copies' -ForegroundColor $menucolor
	write-host '4) Find passive database copies' -ForegroundColor $menucolor
	write-host '5) Overwrite failed ContentIndex' -ForegroundColor $menucolor
	write-host '6) Exit' -ForegroundColor darkgreen
	write-host
	$menu = Read-Host "Select an option [1-6]"
	switch ($menu)
	{
		1{GetContentIndexState}
		2{GetBackupState}
		3{GetActiveCopies}
		4{GetPassiveCopies}
		5{FixContentIndex}
		6{exitMenu}
		default{. main}
	}
}



##Check backup status
function GetBackupState
{
	Get-MailboxDatabase | where {$_.Recovery -eq $False } `
		| Select-Object -Property Server, Name , LastFullBackup, LastIncrementalBackup, BackupInProgess `
		| Sort-Object -Property Server,  Name | ft -AutoSize

	Get-PublicFolderDatabase `
		| Select-Object -Property Server, Name , LastFullBackup, LastIncrementalBackup, BackupInProgess `
		| Sort-Object -Property Server, Name | ft -AutoSize
	. GoToMenu
}

##Fix contentindex
function FixContentIndex
{
	write-host 'Trying to repair failed ContentIndex:'
	$destCopy = read-host "Input destination database copy: "
	Update-MailboxDatabaseCopy $destCopy –CatalogOnly 
	. GoToMenu
}

##Find passive database copies 
function GetPassiveCopies{
	write-host 'Passive database copies:'
	try
		{
		#Get mailbox servers
		$Servers = Get-ExchangeServer | Where-Object {($_.ServerRole -match "Mailbox") }
		foreach($Server in $Servers)
		{
			Get-MailboxDatabaseCopyStatus -Server $Server.Name | Where-Object{($_.Status -ne "Mounted")}| out-default #Out-default needed to work around bug http://connect.microsoft.com/PowerShell/feedback/details/152205/bug-with-default-formatter.
		}
	}
	catch [Exception]
	{
		Write-Host "Something went horribly wrong..."
		Write-Host $_.Exception.TosSTring()
	}
	. GoToMenu
}

##Find active database copies 
function GetActiveCopies{
	write-host 'Active database copies:'
	try
		{
		#Get mailbox servers
		$Servers = Get-ExchangeServer | Where-Object {($_.ServerRole -match "Mailbox") }
		foreach($Server in $Servers)
		{
			Get-MailboxDatabaseCopyStatus -Server $Server.Name | Where-Object{($_.Status -eq "Mounted")}| out-default
		}
	}
	catch [Exception]
	{
		Write-Host "Something went horribly wrong..."
		Write-Host $_.Exception.TosSTring()
	}
	. GoToMenu
}	
	
##Find database copies with failed ContentIndex State 
function GetContentIndexState
{
	write-host 'Database copies with failed ContentIndex State:'
	try
		{
		#Get mailbox servers
		$Servers = Get-ExchangeServer | Where-Object {($_.ServerRole -match "Mailbox") }
		foreach($Server in $Servers)
		{
			Get-MailboxDatabaseCopyStatus -Server $Server.Name | Where-Object{($_.ContentIndexState -ne "Healthy")}| out-default
		}
	}
	catch [Exception]
	{
		Write-Host "Something went horribly wrong..."
		Write-Host $_.Exception.TosSTring()
	}
	. GoToMenu
}

#Exit script
function exitMenu
{
	exit
}

#Go back to menu
function GoToMenu
{
	write-host
	write-host 'Press any key to continue...' | out-default
	$s=[Console]::ReadKey($true)
	. main
}

#Start script
. main


Reparere søkeindeksen på en databasekopi

Problem

Forsøk på å gjøre passiv databasekopi aktiv feiler med følgende melding:

Database copy [navn] on server [server] has content index catalog files in the following state: ‘Failed’.

Løsning

Sjekk om det gjelder flere baser ved å kjøre følgende script:

###############################################################################
###			Find database copies with failed ContentIndex State       		###
###			 Jan Kåre Lokna												###
###			v 1																###	
###############################################################################
try
	{
	#Get mailbox servers
	$Servers = Get-ExchangeServer | Where-Object {($_.ServerRole -match "Mailbox") }
	foreach($Server in $Servers)
	{
		Get-MailboxDatabaseCopyStatus -Server $Server.Name | Where-Object{($_.ContentIndexState -ne "Healthy")}
	}
}
catch [Exception]
{
	Write-Host "Something went horribly wrong..."
	Write-Host $_.Exception.TosSTring()
}

Eksempel på output:

Name Status CopyQueue ReplayQueue LastInspectedLogTime ContentIndex 
Length Length State 
---- ------ --------- ----------- -------------------- ------------ 
DB2\EXCserver2 Healthy 0 0 27.05.2011 13:51:07 Failed 

Kjør følgende kommando for å hente data fra aktiv kopi:

Update-MailboxDatabaseCopy [name] -CatalogOnly 

Name hentes fra output av skriptet over. Vær obs på at kommandoen kasnkje må kjøres på den server som eier databasekopien (EXCServer2 i eksempelet over).

Outlook 2010 i buffret modus mot Exchange 2003

Problem

Oppdatering av offline adress book og teamkalender tar lang tid eller skjer ikke dersom Outlook 2010 er satt opp til å bruke bufret modus mot en Exchange 2003 server med front-end og back-end.

Problemet kan enklest reproduseres ved å booke en ressurs. Dersom man har satt opp direktebooking riktig, (se http://plo.lokna.net/?p=477), vil ressursens kalender bli oppdatert. Dog vil man ikke se det samme dersom man har ressursens kalender åpen i egen Outlook (teamkalender) før man restarter Outlook, bytter nettverkstilkobling eller restarter maskinen. Hva som skal til for å trigge en synk varierer.

Jeg har ikke lykkes i å identifisere årsaken til dette, men problemet er reproduserbart hos min arbeidsgiver. Løsningen har jeg derimot funnet, så jeg har ikke søkt så lenge etter årsaken.

Løsning 1 – Gi blaffen i bufret modus

 

Dersom man bruker online modus fungerer alt uten problemer. Om man har en stasjonærmaskin tilknyttet direkte i samme nettverk som Exchange-serveren er det egentlig ikke nødvendig å bruke bufret modus. Man får dog litt tregere søk i innboksen, og dersom man har en stor postkasse kan dette påvirke ytelsen til systemet. Dette er dermed egentlig ikke å anbefale, men det fungerer.

Løsning 2 – Sette opp proxy for bufret modus

Aller først må man sjekke at bufret modus er på:

SNAGHTML5c2a448

Deretter må man sette opp frontend-server proxyinnstillingene som følger:

image

Altså:

  • Slå på SSL og sertifikatautentisering
  • Aktiver NTLM-godkjenning
  • Velg HTTP først uansett nettverkshastighet

Problemer med reservasjon av ressurser mot Exchange 2003 via Outlook 2010

Problem

Dersom man har møterom eller andre ressurser i Exchange 2003 som er aktivert for direct booking hender det at Outlook 2010 ikke klarer å registrere reservasjoner, og de blir liggende i innboksen til ressursen som ubesvart/tentativ. Det hender at reservasjonen går igjennom etter noe tid, og det hender at det virker fint, men av og til så virker det bare ikke. Dette kommer av at Outlook 2010 ikke aktiverer støtte for DirectBooking som standard, men istedenfor sender forespørselen på mail til ressursen. Siden de fleste ressurskontoer er “hodeløse” og aldri blir åpnet av en klient er man avhengig av offlineprossesering på serveren. Continue reading “Problemer med reservasjon av ressurser mot Exchange 2003 via Outlook 2010”