Update 02/13/2014: By popular demand, “Lost modified on:” field has been added which displays the date on which one of the settings on the virtual directory was last modified.
Update 02/12/2014: Added some new features to the script. If you add -ADPropertiesOnly when calling the script, it will now only query the ADProperties which processes a whole lot faster in distributed environments. The script now also automatically creates a Remote PowerShell session if it cannot find an active one to use. It will connect to the server you specify with the -ComputerName parameter. If you choose not to specify the parameter, the script will create a remote PowerShell session to the localhost. Thirdly, there’s now also a -Filter parameter which allows you to filter the server(s) for which you want the see the results.
The following command would query all CAS’es in the environment which have “02″ in their name and return the ADproperties for the different virtual directories:
Note: as you can see, I’ve also updated the -FilePath parameter to now be called -ReportPath. Some people reported that the previous name could be a little confusing. I would also like to thank Thomas Torggler for his input. He had some nice ideas!
The download link for the script can be found below.
Update 01/30/2013: Based on feedback, I fixed the issue that script threw an error when there was only a single server.
As a consultant, I regularly come across situations in which I have to troubleshoot an existing Exchange server environment or perhaps have to make an assessment, health report, etc.
Almost every time, I found myself looking up the information from the different (commonly used) virtual directories like: Autodiscover, ActiveSync, OWA, ECP, Web Services, OAB… That’s why I thought it became about time I automated this process so that I didn’t have to type the commands in manually anymore.
The result is a simple script which will query the Exchange Client Access Servers in your environment and will query them for their virtual directory information. Depending on the use of the virtual directory, different object are shown:
For now, (version 1.0), the script will only be able to show you information from Exchange 2010 and Exchange 2013. Also, it has to be run from an Exchange Management Shell.
In a future version, the script should also be able to provide results for Exchange 2007 and be ran remotely from a non-Exchange workstation or server.
The script will accept a single parameter to provide the path where the HTML-file should be located. For instance:
As usual, the script contains a function which you can re-use easily by dot-sourcing the script like this:
There’s no real magic behind the code. First, we look for possible Exchange 2010 & 2013 Client Access Servers:
The gathered is then stored in a separate table and written to an html-file:
Disclaimer: these scripts are provided “as-is” and are to be used on your own responsibility. I do not accept any liability nor do I take any responsibility for using these scripts in your environment. Please use with caution and always test them before usage! Enjoy!
Michael Van Horenbeeck MVP, MCSM
Michael Van Horenbeeck is a Microsoft Certified Solutions Master (MCSM) and Exchange Server MVP from Belgium, with a strong focus on Microsoft Exchange, Office 365, Active Directory, and a bit of Lync. Michael has been active in the industry for about 12 years and developed a love for Exchange back in 2000. He is a frequent blogger and a member of the Belgian Unified Communications User Group Pro-Exchange. Besides writing about technology, Michael is a regular contributor to The UC Architects podcast and speaker at various conferences around the world.
How to Build a SCCM OSD Progress Report to Wow Your Boss - Part 3