Benutzer-Werkzeuge

Webseiten-Werkzeuge


exchange:aktivedbverteilen

Aktive Datenbanken gleichmäßig verteilen

Exchange 2010

$Server = "EXGMBX01"
$Target = "EXGMBX02"
 
$Mailboxdatabases = Get-Mailboxdatabase	 -Server $Server
$switch = $true
 
foreach ($DB in $Mailboxdatabases)
{
	if ($DB.ReplicationType -eq "Remote" -and $DB.Recovery -eq $false)
	{
		if ($switch -eq $true)
		{
			Move-ActiveMailboxDataBase -Identity $DB -ActivateOnServer $Target -Confirm:$false
			$switch = $false
		} else
		{
			$switch = $true
		}
	}
}

Update Exchange 2013

$Server = "SHSMBX01"
$Target = "SHSMBX02"
 
$Mailboxdatabases = Get-Mailboxdatabase -Server $Server
$switch = $true
 
foreach ($DB in $Mailboxdatabases)
{
	if ($DB.ReplicationType -eq "Remote" -and $DB.Recovery -eq $false)
	{
		if ($switch -eq $true)
		{
			Move-ActiveMailboxDataBase -Identity $DB.Name -ActivateOnServer $Target -Confirm:$false
			$switch = $false
		} else
		{
			$switch = $true
		}
	}
}

exchange/aktivedbverteilen.txt · Zuletzt geändert: 2016/09/27 18:14 von ronny

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki