Categories

8822

PowerShell in Practice offer today only

Manning have PowerShell in Practice on a half price offer today. Go to www.manning.com and use code dotd0330cc when ordering

Mailbox database status

 

A recent forum post on mailbox database status in Exchange 2007  proved interesting.

If I do this

PS> Get-MailboxDatabase -Status | select Name, server, storagegroup, mounted

Name Server StorageGroup
---- ------ ------------
MailDatabase EXCH07 EXCH07\Test1
MDB01 EXCH07 EXCH07\SG1
MDB02 EXCH071 EXCH071\SG2

but if I do this

PS> Get-MailboxDatabase -Status | select Name, server, storagegroup, mounted | fl *

Name : MailDatabase
Server : EXCH07
StorageGroup : EXCH07\Test1
Mounted : True

I get the mounted property. The help file says you have to use the format cmdlets to see the results of the status property

So if you want to work with the Mounted property  (or the BackupInProgress or OnlineMaintenanceInProgress properties)

You need to do something like this

Get-MailboxDatabase -Status | foreach {
$status = $_ | select -ExpandProperty Mounted
if ($status) {Write-Host "$($_.Identity) is Mounted"}
else {Write-Host "$($_.Identity) is not Mounted"}

}

The value is only visible if you use the –status switch AND you have to either use the format cmdlets or   seelct -expandproperty to be able to work with the property.

Awkward but usable.

Net start – -why?

I am reading the Exchange 2007 Design exam study guide at the moment.  The characters are a bit wooden and the plot is obvious but apart from that its not bad.

One bit made me think that the dots weren’t joined up though.  In a troubleshooting section the authors talk about stopping and starting a service.  When they show how to do it they use net stop and net start.

Hang on a minute.  This is Exchange 2007.  A pre-requisite is PowerShell 1.

PowerShell has good service support. It gets better in Version 2 but v1 has Stop-Service and Start-Service available through the EMS.    Grrr.  And they’d been doing a good job talking about PowerShell up to that point.

 

Exchange 2007 SP1

Couple of interesting points from installing an Exchange 2007 SP1 test machine yesterday.

1) You can't do the schema upgrade if the install routine can't identify the schema master FSMO holder. If replication is not up to date on the machine holding the schema master FSMO then the schema update will fail.

2) Setup requires PowerShell v1 even if you are only running the AD upgrade.  This one is unnecessary.  Looks like the check is just a blanket check rather than a specific check against what is happening

3) .NET 3.5 and PowerShell on Windows 2008 is quite acceptable to Exchange

 

Share this post :

 

Technorati Tags: ,,