We had an independent review of all our Exchange servers and the consultants came back and pointed out that our Checkpoint log location was different than our log files. They wanted us to put the Checkpoint file in the same folder. I did this in 2 parts.
1. Grab all storage groups that currently had different values.
get
-storagegroup
| ?{$_.systemFolderPath
-ne $_.LogFolderPath
} | select server
, name
, logfolderpath
, systemfolderpath
| export
-path c:\Checkpoint.csv
then clean-up the CSV to only include servers I want to fix. I am not concerned with the migration servers as they are all temporary.
2. Set all the SystemFolderPath to match the LogFolderPath values.
$csv = Import-Csv c:\checkpoint.csv
# For precaution, we paused each node before performing the script so it wouldn't
# accidentally roll the CCR node.
#
$list = $csv | ?{$_.server
-match "10"}
foreach ($c in $list) {
$dbname = $c.Name
$srvr = $c.Server
$logs = $c.LogFolderPath
write-host "Working with "$srvr
$sg = Get
-StorageGroup
-Server
$srvr | ?{$_.name
-match $dbname}
write-host "working on " $sg.name
suspend
-storagegroupcopy
-id $sg.identity
Move
-StorageGroupPath
-Identity
$sg.Identity
-SystemFolderPath
$logs -ConfigurationOnly
write-host "Resuming SG Copy"
Resume
-storagegroupcopy
-id $sg.identity
write-host "mounting database"
get
-mailboxdatabase
-storageGroup
$sg.identity
| mount
-database
}
Comments
Post new comment