I recently updated my PVS and XenApp documentation scripts to match changes I made for the new Active Directory (AD) and Microsoft DHCP documentation scripts. Since Barry Schiffer is the author of the NetScaler script, I received his permission to make the same changes to his NetScaler documentation script.
Most of the stuff I changed for the new AD and DHCP scripts is from changes made to the Word Tables. In the new scripts, I learned how to create columns with a fixed width and how to have the header row flow across page breaks. In implementing those changes, I realized the Word code I had borrowed from Jeffery Hicks and others had lots of hard-coded values that I needed to change but I had no idea what the hard-coded values did. I had to dig around on MSDN to find the values and then removed all the hard-coded values from the scripts.
I also took the time to make some changes to some of the “errors” the script handled. The script will no longer abort if the CompanyName registry key is blank and the -CompanyName parameter is not used. I also realized that some scripts aborted if Cover Pages were not found and some did not abort. All the scripts were change to not abort but to give a warning message that the report will not have a Cover Page.
Some of the testers for the new scripts didn’t understand the error messages so I took the time to reword the Warning and Error messages and try to format them so they stand out more from the rest of the Warning or Error text.
Some people reported that when a script ended or aborted they received an error that the “variable word could not be found”. The scripts now test for the existence of the “word” variable before attempting to remove it.
The next update to this script will require PowerShell version 3 or higher.
The NetScaler script is now at version 1.0.2.
NOTE: All scripts are continually updated. You can always find the most current versions by going to http://carlwebster.com/where-to-get-copies-of-the-documentation-scripts/
Webster and Barry