Friday, May 15, 2015

get-csdocumentation v 2_4 released

After running the get-csdocumentation scripts on a couple of new Skype for Business deployments, I wanted to do some simple changes. It's basically the same script, but I have added a few functions to clean up the code and add some functionality.

Here are the highlights of the new version:

  • Cleanup: Better code for HTML generation
  • Cleanup: Better IP address documentation
  • Cleanup: Better Service dump (ignoring blank services)
  • New feature: Adding software version on servers the script can connect to (Requires WinRM, firewall and rigths on target computer), can take some time
  • New feature: Send documentation in email on complete


Cleanup: Better code for HTML generation

I discovered a way to create the required HTML headers through a function. Saved me a lot of code, and makes it easier to change layout by editing only one line of code.

Cleanup: Better IP address documentation
Previous versions of my script dumped all machines in one table. This version should create one table pr pool. It will be easier to identify the server/pool connection:


Cleanup: Better Service dump (ignoring blank services)
Again, moving code to functions, and using smarter discovery to list configured services. Skipping empty roles.

New feature: Adding software version on servers the script can connect to (Requires WinRM, firewall and rigths on target computer), can take some time
This is a feature I have been looking into for a while, not quite sure how to solve (potential error handling and warnings as servers are unavailable). But now I think I have found how to at least try to get the information, without causing a lot of blood red text. 
This feature will only work as mentioned, where WinRM is available with the correct credentials for the user running the script, and firewall ports are open. Here is an example of how it could look. (This is added to a new file in the documentation set)


This feature added some delay to the script, where it could seem like nothing is happening. I have added an indication of the remote connection to the script output.

New feature: Send documentation in email on complete
A requested feature from many users: A way to automatically send the gathered documentation in a mail. I have simply reused the code from the backup-sfb script, and the script can now send an email looking like this:


The script was uploaded to Thechnet Gallery, and can be downloaded from here.