The UC Architects Podcast Ep19

iTunes-Podcast-logo[1]The 19th episode of The UC Architects podcast is now online. This episode is hosted by Pat Richard who’s joined by Johan Veldhuis, Michael Van Horenbeeck, Paul Cunningham (at last!),  Tom Arbuthnot and Ståle Hansen. Editing was done by Michael van Hoorenbeeck.

Amongst the topics discussed in this episode are:

  • Enterprise Connect
  • Web RTC
  • Exchange CU1
  • Upgrading Office Web Apps servers
  • Lync 2013 Rollout and Adoption Success Kit (RASK)
  • Stale’s Script Calling Numbers
  • Lync Android Client
  • Skype 6.3 and Lync Federation
  • Retirement of Dr. Rez blog site
  • Script: Michael’s connect to Exchange Online
  • Script: Paul’s Get-DagHealth
  • DAG Networks
  • Script: Johan’s IOS6 Calender Issue Cleanup
  • Office 365 IPv6 test plan and ITAR Support Service & Network descriptions
  • TechEd NA
  • London User Group

More information on the podcast including references and a link to download the podcast directly here or you can subscribe to the podcasts using iTunes, Zune or use the RSS feed.

About
The UC Architects is a bi-weekly community podcast by people with a passion for Unified Communications; our main focus is on Exchange, Lync or related subjects.

Exchange 2013 CU1 ETA: April 2nd

Ex2013 LogoToday the Exchange Team announced postponing the release of Exchange 2013 Cumulative Update 1 for a few more days. Originally, CU1 was scheduled for Q1 2013, but the date has been set now at April 2nd, 2013.

While it may sound disappointing when you’re waiting for Exchange 2013 RTM CU1, it makes sense to postpone it a bit. As the team indicated,the time is used to add functionality required for coexistence scenarios with Exchange Server 2010 which otherwise had to be put in an update for Exchange 2010 Client Access servers. I expect people to be less happy as Exchange 2010 Service Pack 3 was heralded as the Exchange 2010 product level for coexistence support with Exchange 2013 (running CU1).

Also, looking at time frames involved with testing and accepting updates in production environments, I personally applaud this decision as putting that code in Exchange 2013 at the cost of a few days may in the end be faster than adding that code to Exchange Server 2010, requiring customers to initiate test an acceptance tracks for production updates.

So, until further notice we’ll have to wait just a few more additional days to see what Cumulative Update 1 will bring us.

New-MoveRequest fails with “Database .. doesn’t exist”

Exchange 2010 LogoA quick write up on something which you might encounter when trying to move mailboxes across forests. Often, operators don’t always have full access permissions in both environments and rely on provided accounts or delegated permissions to execute the move.

Suppose you’re in the target environment and are asked to migrate mailboxes cross-forest from a previous version of Exchange to Exchange 2010. One of the first steps would be to run the Prepare-MoveRequest.ps1 script to prepare the target object and populate it with Exchange-related attributes from the source environment.

You then come at a point in such a migration, after running Active Directory Migration Tool – ADMT and perhaps some additional tweaks, when you need to actually move the user’s mailbox. So, you enter for example:

$cred= Get-Credentials
New-MoveRequest –Identity UserX –RemoteLegacy –TargetDatabase DB1 -RemoteGlobalCatalog SourceDC –RemoteCredential $cred –TargetDeliveryDomain maildomain.com

Mailbox move request are being queued but for some mailboxes you may encounter the following error message: “Database xxxxx-xxxx-xxxx-xxxx-xxxxx doesn’t exist”. That error message may get you worrying, but let’s investigate.

image

We’re in the target environment and the source environment is running a legacy version of Exchange so setting up a remote PowerShell session and using Get-MailboxDatabase <GUID> is not an option. All roads lead to Rome when querying Active Directory, but in this case let’s load up our trusty LDP to look up that GUID; it should map to a database in the source environment.

In LDP, use Connection > Connect and enter the name of a remote domain controller, like the one specified as RemoteGlobalCatalog, in our example RemoteDC. Then, use Bind providing the credentials you used with RemoteCredential.

Next, select View > Tree and use <GUID=xxxxx-xxxx-xxxx-xxxx-xxxxx> as BaseDN (replace those x’s with the GUID reported by the failing New-MoveRequest and make sure you include those less and greater than symbols).

CantMoveLookup

Now, normally the database object with that GUID and its properties will be returned. If not, something is probably wrong with the permissions on the mailbox, directly or indirectly. Depending on whether you’re able to migrate other users from the same database, server up to the organization, you can rule out if it’s a per-mailbox issue, database permission issue etc.

This proves that as always, preparation is everything. Therefor, prior to migration be sure to check or correct effective permissions on mailboxes to prevent any surprises in that area when you’re actually migrating.

Note that the permission ACLs on a mailbox needs to be in a so-called non-canonical order. To fix this, you may find the FixMailboxSD utility helpful. More information on the importance of canonical ordering of mailbox permissions in Exchange here.

The UC Architects Podcast Ep18

iTunes-Podcast-logo[1]Thanks to some speedy editing by Johan Veldhuis, the 18th episode of The UC Architects podcast is now online. This episode is hosted by Steve Goodman who’s joined by John Cook, Justin Morris, Serkan Varoglu, Tim Harrington, Ståle Hansen and yours truly.

Amongst the topics discussed in this episode are:

  • Lync Conference Roundup
  • UC Architects featured by Windows IT Pro
  • Lync Updates
  • Lync Deployment Script by Tommy Clarke and Stale Hansen
  • Office 365 Wave 15 GA
  • Exchange, Lync and Office 2013 Ignite
  • MEC 2014 Announcement
  • JetStress 2013
  • Exchange Deployment Assistant 2010 SP2 / 2013
  • PST Capture Tool v2
  • Exchange 2013 Unattended Install Script
  • Exchange Reports tool

More information on the podcast including references and a link to download the podcast directly here or you can subscribe to the podcasts using iTunes, Zune or use the RSS feed.

About
The UC Architects is a bi-weekly podcast on Unified Communications mainly focused on the Microsoft domain, i.e. Exchange, Lync or related subjects.

Jetstress 2013

Ex2013 LogoIn the list of expected products to accompany Exchange 2013, Microsoft today released JetStress 2013, version 15.0.651.0.

Jetstress is your tool of choice to check the performance and stability of your storage design under load. It simulates Exchange I/O behaviour using Exchange 2013 patterns allowing you to verify dimensioning and validate performance expectations from a database perspective.

Capture

To run JetStress 2013 you need:

  • .NET Framework 4.5
  • ESE.DLL, ESEPerf.dll, ESEPerf.ini, ESEPerf.hxx (copy these from an Exchange 2013 installation source)

Note: The installer currently installs a shortcut named “Exchange JetStress 2010″, but it really is JetStress 2013.

You can download the Jetstress 2013 here.

The UC Architects Podcast Ep17

iTunes-Podcast-logo[1]The 17th episode of The UC Architects podcast is online. This episode is hosted by Pat Richard who’s joined by John Cook, Ståle Hansen, Tom Arbuthnot, Johan Veldhuis and yours truly.

Amongst the topics discussed in this episode are:

  • Lync User Management Tool;
  • Lync Mac Update 14.0.4;
  • Lync Jan2013 Update;
  • Lync Wi-Fi Whitepaper;
  • Polycom CX500/CX600/CX3000 Update;
  • Lync Conference;
  • Lync Connectivity Analyzer;
  • Set-CsLync2013Prereqs.ps1 Script;
  • Surface Pro;
  • MSCM Beta Program;
  • Update strategy for Exchange;
  • iOS 6.x Calendar Issues.

You can download the podcast directly here or you can subscribe to the podcasts using iTunes, Zune or use the RSS feed.

About the Podcast
The UC Architects is a bi-weekly podcast on Unified Communications in the Microsoft domain, i.e. Exchange and Lync, or related subjects.

Regular Expressions and Named Groups

powershellWhen processing strings, you may sometimes need to split those strings into several parts based on criteria. For example, you may need to split the ActiveSync DeviceUserAgent string, which can be used to identify the model and version of a device, for example:

  • Apple-iPhone4C1/1002.142
  • Apple-iPad2C1/1002.141
  • Apple-iPhone4C1/1001.523

Now let’s assume you want to take this string apart in the device model and the version, using the slash as a marker. When asking 10 people, a majority will come up with something along the following kind of structure:

$pos= ($Device.DeviceUserAgent).IndexOf("/")+1
$Device= ($Device.DeviceUserAgent).Substring(0, $pos)
$Version= ($Device.DeviceUserAgent).Substring($pos+1)

Of course, this works but you need to understand what’s going on and additional code is required the handle situations when there’s no “/” present. Perhaps a more elegant and readable way, especially if you want to split the string in more than 2 parts, is using regular expressions to perform pattern matching. When used in combination with named groups, you will get easily referable parts using a name.

For the purpose of demonstrating it’s power, we’ll start by assigning some user agent strings to a variable. Note that you could use the DeviceUserAgent property of a collection of ActiveSync devices as well.

$UserAgents=@("Apple-iPhone4C1/1001.523", "Apple-iPhone3C1/801.293")

image

The pattern to look for in each user agent string is it starts with some characters, followed by a slash, followed by a number, followed by a dot and ending in a number. Translated to regular expression, the pattern would be:

^(.*)/(\d+)\.(\d+)$

where:

  • ^ marks the start of the subject;
  • (.*) marks a sub pattern of any character, the * indicates it’s present zero, one or more times;
  • The slash is marked by (surprise!) a /;
  • (\d+) marks a sub pattern of decimal digit, the + indicates it’s used one or more times;
  • \. will match the dot (escaping it with “\” makes sure next character is used literally as ‘dot’ normally means any character);
  • $ marks the end of the subject.

When matching a pattern against a string you can use –match, e.g. “string” –match “pattern”. When this results in True, a match is found; when the result is False, the format of the string is invalid (of course requires properly defined pattern). After performing a match, the predefined variable $matches will contain an array containing the results, where element [0] contains the complete matching string and [1] .. [n] each matching (sub) pattern.

image

You see that each match returns True (match found) and $matches[1] for example contains the first sub pattern for each match, i.e. the device. This is nice and perhaps neater than splitting strings as mentioned in the start of this article, but wouldn’t it be even cooler if you can refer to those parts using names, e.g. device?

Here’s where named groups come into play and you can compare it to PowerShell’s calculated properties (select @{Name=”KB”; Expression={$_.Size/1kb}}) or column aliases in SQL (SELECT ColA as Name). To use named groups, put “?<name>” at the start of the (sub) pattern. For example, to use the name “device” for the first sub pattern “(.*)”, the expression would become “(?<device>.*)”. The complete pattern using named groups would then become something like:

^(?<device>.*)/(?<major>\d+)\.(?<minor>\d+)$

The cmdlet for this example would then become:

$UserAgents | ForEach { [void]($_ -match "^(?<device>.*)/(?<major>\d+)\.(?<minor>\d+)$"); $matches }

Which will give the following results:

image

Note that I’ve added casting (i.e. converting a variable to a different type) the output of “-match” to [void] so the match results (True or False) won’t be part of the output.

Having named groups now allows us to use easily match individual parts, filter or group information, e.g.:

$UserAgents | ForEach {
    [void]($_ -match "^(?<device>.*)/(?<major>\d+)\.(?<minor>\d+)$")
    If( $matches.major –gt 800) { 
        echo $matches[0]
    }
}

Of course it’s a matter of taste, but having this information available as $matches.device instead of $matches[1] makes introducing changes more easy (no need to renumber when inserting/removing a sub pattern) and results in more readable code.

“Profiling the best Exchange Server Pros” award

logo_itke_sm[1]Somebody must be happy with my recent contributions to the Exchange community.

This week I received an e-mail from Matt Gervais of TechTarget who mentioned I was nominated for their “Profiling the best Exchange Server professionals” award and if I’d like to accept the honor as their February 2013 recipient.

For those who don’t know TechTarget, they provide information aimed at IT professionals. Exchange people might know them from their Exchange-related searchexchange.techtarget.com site. This site publishes articles from Exchange MVPs like The UC Architects’ Steve Goodman, Andry Grogan or J. Peter Bruzzese.

Recognition from the community is always nice and is a great motivator, so to whoever nominated me: a big thank you. As part of the related article, Matt also asked me some quick questions on how I became involved with Exchange and why I love doing my job. You can read the short interview here.

MEC 2014 announced!

A quick heads-up for the ones which didn’t receive the notification via e-mail or social media: Microsoft announced the next Microsoft Exchange Conference is going to be held in April 2014:

savethedate[1]So block your agendas and plan those budgets or submit requests to management for 2014 early!

Exchange 2013 Unattended Installation Script (Updated)

Ex2013 LogoI’m pleased to announce the availability of Install-Exchange2013.ps1, a PowerShell script to perform a fully unattended setup of Exchange Server 2013 RTM or CU1.

The script takes care of:

  • Installing required Windows Server 2012 features and optionally prepare Active Directory (phase 1);
  • Install Exchange Server 2013 prerequisites (phase 2);
  • Optionally install Exchange Server 2013 (phase 3)
  • Optionally – depending on phase 3 – perform post-configuration (phase 4, tailor to your own needs);
  • When done, the script will perform some cleaning up, like removing the state file and setting the startup of Transport Service to Automatic (phase 5).

Usage
This script version requires a domain-joined Windows Server 2012 system, an account to perform the installation (and optionally prepare Active Directory) and the location where the Exchange Server 2013 installation files are stored (e.g. an UNC path).

The syntax is as follows:

Install-Exchange2013.ps1 [-InstallCAS] [-InstallMailbox] -SourcePath <string> [-Organization <string>] [-MDBName <string>] [-MDBDBPath <string>] [-MDBLogPath <string>] [-InstallPath <string>] [-TargetPath <string>] [-AutoPilot] [-Credentials <pscredential>] [-NoSetup] [<CommonParameters>]

A short description of the parameters:

  • Organization (optional): Specifies name of the Exchange organization to create. When omitted, the step to prepare Active Directory (PrepareAD) will be skipped.
  • InstallMailbox: Specifies you want to install the Mailbox server role.
  • InstallCAS: Specifies you want to install the CAS role.
  • MDBName (optional): Specifies name of the initially created database.
  • MDBDBPath (optional): Specifies database path of the initially created database (requires MDBName).
  • MDBLogPath (optional): Specifies log path of the initially created database (requires MDBName).
  • InstallPath (optional): Specifies (temporary) location of where to store prerequisites, transcript and state file. Default location is C:\Install.
  • NoSetup (optional): Specifies you don’t want to perform Exchange setup.
  • SourcePath: Specifies location of the Exchange 2013 installation files (setup.exe).
  • TargetPath: Specifies the location where to install the Exchange 2013.
  • AutoPilot (switch): Specifies you want to automatically restart, logon using credentials specified and continue the installation. When not specified, you will need to restart, logon and start the script manually each time (without parameters).
  • Credentials (optional): Specifies credentials to use for automatic logon. Use DOMAIN\User or user@domain. When not specified, you will be prompted to enter credentials.

Note that the script uses an XML file to store the (original) parameters used to start the script but also to keep track of the the process. Of course, if required, you can use predefined XML files to run the script without parameters.

Note that when not present, the script will try to download the prerequisites from the internet. When that isn’t possible or to save bandwidth, you can put them in the location defined by InstallPath and the script will detect and use them.

The post-configuration is currently adding IFilters for OneNote and Publisher (Mailbox) only. There are comments in the script where to add your own additional post-configuration steps.

For example, assume we want to start a fully unattended install of an Exchange Server 2013 Client Access server, using a network location for the Exchange Server 2013 source files. After setting the Execution Policy to Unrestricted and storing the script locally, we start the script using:

 .\Install-Exchange2013.ps1 –InstallCAS –SourcePath ‘\\server\share\isos\Microsoft\Exchange2013\mu_exchange_server_2013_x64_dvd_1112105’ –AutoPilot –Verbose

The script will perform some checks and since AutoPilot was specified without using the Credentials parameter, the script will ask for credentials.

Capture1

After entering the credentials, the required features will be installed. Since OrganizationName wasn’t specified, Active Directory preparation will be skipped.

Capture2

After rebooting, the system will automatically log on using the credentials specified earlier and start the script (RunOnce registry key is utilized for this purpose). It will read the last known state from the XML file and will continue with the next phase, which is downloading (when not present) and installing the Exchange prerequisites.

Capture3

Next, after rebooting and the automatic logon, Exchange will be installed from the source location.

Capture4

When done, the system will perform post configuration and finalization steps including reboots and logons. Note that it may seem like a lot of reboots, but rebooting after installing Windows features and Exchange prerequisites is required anyway so I put reboots after the other milestones as well.

You can download Install-Exchange2013.ps1 here. Please leave your feedback or bug reports in the comments.

Revision History
1.02: Fixes AD preparation logic and adds checks to see if domain is in native mode. It also fixes a small typo in the post-prepare AD function.
1.03: Tested against Exchange Server 2013 CU1, replaced installing OS features manually by using /InstallWindowsComponents and removed installation of Office Filtering Pack (routines still there because they’re required for the Exchange 2010 SP3 version I’m working on).
1.1: When AD was prepared, RSAT-ADDS-Tools won’t be uninstalled, pending reboot detection (in AutoPilot, script will reboot and restart phase), installs Server-Media-Foundation feature (UCMA 4.0 requirement), validates provided credentials for AutoPilot and checks OS version as string (should accommodate non-US OS).