• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 806
  • Last Modified:

Powershell script to make Exchange 2007 CCR cluster online

Hy,

I need a script to check if the CCR cluster is online or not.

If the Cluster and all ressource is Online, the script not do anything.

If the cluster is Oflline, the script start the cluster.

Thanks for your help
0
cawasaki
Asked:
cawasaki
  • 4
  • 3
1 Solution
 
endital1097Commented:
The important piece of a CCR cluster is that the databases are online
Get-MailboxDatabase -Status | ForEach-Object { if  ($_.Mounted -eq $False) { Mount-Database $_.ObjectGuid }

0
 
cawasakiAuthor Commented:
Hi,

Your script do not work because database need the CMS started before.
0
 
endital1097Commented:
you could run

$cluster = Get-Service ClusSvc
if($cluster.Status -eq "Stopped") { Start-Service ClusSvc }
0
What Security Threats Are We Predicting for 2018?

Cryptocurrency, IoT botnets, MFA, and more! Hackers are already planning their next big attacks for 2018. Learn what you might face, and how to defend against it with our 2018 security predictions.

 
cawasakiAuthor Commented:
Hi,

The service is running, the good command is:

 Start-ClusteredMailboxServer

this command start all clustered ressource.

Its possible to get this command in the script?

Thanks
0
 
endital1097Commented:
there are several pieces and i didn't have access to any cluster over the weekend

##verify cluster service is running and start if it is not
$cluster = Get-Service ClusSvc
if($cluster.Status -eq "Stopped") { Start-Service ClusSvc }

##check the status of the CCR
$ccr =Get-ClusteredMailboxServerStatus
if($ccr -ne "Online) { Start-ClusteredMailboxServer <CcrName> }

0
 
cawasakiAuthor Commented:
##check the status of the CCR
$ccr =Get-ClusteredMailboxServerStatus
if($ccr -ne "Online) { Start-ClusteredMailboxServer <CcrName> }


if($ccr -ne "Online)==>Offline or online :)
0
 
endital1097Commented:
There are other potential values so I would use online
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now