Tell me more…
It’s been about 573 days or almost 75 weeks since I originally published my blog post titled “Making sense of a TBXML” which included a PowerShell script that could parse the data from a Lync Topology Builder file and create a spreadsheet and Visio diagram. I’ve published a few blog posts since then with new scripts, but never stopped working on improving my Lync Documentation Script. It has grown immeasurably in complexity and capability since then.
Before I get into all the gory details, I’d like to thank a few people for their help along the way. Thank you to Pat Richard and Luke Kannel who helped test out the earlier versions and provided invaluable feedback on bugs, fixes, and features. I’d also like to thank the guys over at DigiCert for their help in getting me a code signing certificate so all of these scripts could be signed. And last but certainly not least a giant thank you to Tim Harrington who spent a stupid amount of hours testing, validating, and providing great feedback.
All right, let’s get down to business. One huge change from the previous documentation script is that the TBXML is not the primary source of data anymore. It has a lot of great information stored in it, but still comes up lacking when you want to include things like certificate data and software versions. To get around this limitation the original script was broken into three smaller scripts.
This is the heart and soul of the tools as it does the data collection and sorting. It’s fairly straightforward and only has one command-line option which is -EdgeCredentials. The command-line option is to specify the non-domain credentials for connecting to the Edge server(s) for more enhanced data collection for things like CPU Core Count, RAM totals, and Certificates. If you don’t specify Edge Credentials the script will prompt you to enter them, if you cancel the credential prompt the script will continue and still pull some limited data for the Edge servers.
I typically run this from one of the Front-End servers as it will require the Lync PowerShell tools. The other thing that is required is the ability to do DNS lookups against an external DNS server, so UDP 53 outbound. Get-Help context is available for the scripts, but it should be pretty straightforward.
This will produce a zip archive containing an XML file with all of the environment data. You will need to copy the zip file to a workstation that has Word and Visio installed to run the next two scripts for report generation. My testing and validation was done on Windows 7 with Office 2010 and Office 2013. It should work with Windows 8, and may work with older versions of Office.
This script will build a Word document from the data package collected from the above script. The only command-line option for this and the Visio script below is -LyncDataFile which is used to provide the file name for the file created with the Get-LyncInfo.ps1 script. If you don’t specify the data package file name at the command-line the script will show the Open File dialog.
One huge caveat with the Word report creation script and the Visio script below is that if you move the mouse cursor in the window during creation it will break the process and mess up the reports.There’s not much else to configure or change.
Again this script will accept the -LyncDataFile command-line option to specify the data file to build from, if you don’t specify a data file the script will present the Open File dialog. Again, there’s not much else to configure or change. This script does require the Office/Exchange/Lync 2013 Visio stencil pack to be in your “My Documents\My Shapes” folder. Don’t worry if you don’t have it downloaded, Pat Richard has been so gracious as to provide a section of the script that will download and place them in the correct folder.
Be extremely careful not to click in or on the Visio or PowerShell windows while it’s running. I know it seems weird but something within PowerShell and/or Visio does not like it, specifically the AutoConnect method on the Pool to Site connectors will error out. I might have been able to bypass this by keeping the Visio window hidden during the drawing process, but it’s kind of cool to watch it work.
You can download a zip file containing the scripts from the TechNet gallery at the link below.