Solved

Exchange Build Version via Powershell

Posted on 2016-09-06
2
34 Views
Last Modified: 2016-09-06
Hi Experts,

I ask myself why
Get-ExchangeServer | Where-Object {$_.AdminDisplayVersion.Build -eq 847}

Open in new window

functions without problems but
switch (Get-ExchangeServer | Select-Object {$_.AdminDisplayVersion.Build})
{
    516 {"RTM-Version (Release to Manufacturing) von Exchange Server 2013 Release-Date: 03.12.12 "}
    847 {"Exchange Server 2013 SP1 Release-Date: 25.02.14 "}
    Default {"unknown Exchange build Number"}
}

Open in new window

does not function.

I suppose that  $_.AdminDisplayVersion.Build is an [INT32] (in my case '847'; switch function end alway in DEFAULT

thank you in anticipation
reredok
0
Comment
Question by:reredok
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 41786260
You need to switch based on the values, not collection ..
Example..
Get-ExchangeServer | %{
switch ($_.AdminDisplayVersion.Build)
 {
    516 {"RTM-Version (Release to Manufacturing) von Exchange Server 2013 Release-Date: 03.12.12 "}
    847 {"Exchange Server 2013 SP1 Release-Date: 25.02.14 "}
    Default {"unknown Exchange build Number"}
 }
}

Open in new window

1
 
LVL 4

Author Closing Comment

by:reredok
ID: 41786279
thx
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now