Manning have PowerShell in Practice on a half price offer today. Go to www.manning.com and use code dotd0330cc when ordering
Archive for PowerShell and Exchange 2007
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.
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.
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 : | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Categories
- .NET
- Active Directory
- Architecture
- Azure
- Bash
- BITS
- Books
- CDXML
- CIM
- Cloud
- COM
- Containers
- Deep Dive
- Desired State Configuration
- DevOps
- DHCP
- DNS
- DSC
- European Summit
- Events
- Exchange
- File System
- Firewall
- General
- General IT Matters
- Hyper-V
- IIS
- Infrastructure
- IT Community
- IT Security
- Learning PowerShell
- Linux
- Math
- Microsoft
- Modules
- Nano Server
- Networking
- Office 2010
- Office 2013
- Open Source
- Opinion
- Outlook
- Philosophy
- PowerShell
- PowerShell 7
- PowerShell and .NET
- PowerShell and Active Directory
- PowerShell and CIM
- PowerShell and Exchange 2007
- PowerShell and IIS
- PowerShell and SQL Server
- PowerShell and WMI
- PowerShell Basics
- PowerShell original
- PowerShell Summit
- PowerShell User Group
- PowerShell User Group 2
- PowerShell v2
- PowerShell V3
- PowerShell v4
- PowerShell v5
- PowerShell v6
- PowerShell.org
- PowerShellGet
- PowerShellV2
- PSAM
- Rant
- Registry
- Scripting
- Scripting Games
- Scripting Games 2104
- Security
- SQL Server
- Storage
- Strings
- Summit
- Technology
- Uncategorized
- Virtualization
- Windows 10
- Windows 2012 R2
- Windows 7
- Windows 8
- Windows 8 Server
- Windows 8.1
- Windows Server
- Windows server 1709
- Windows Server 2008
- Windows Server 2008 R2
- Windows Server 2012
- Windows Server 2012 R2
- Windows Server 2016
- Windows Server 2019
- WMFv5
- WPF
- WSUS