Citrix NetScaler documentation script

Citrix NetScaler documentation

The Citrix NetScaler platform offers a broad set of features and a massive amount of configuration items for each of those features. The flexibility that this gives us also introduces complexity, especially since you configure a service on a Citrix NetScaler once and changes are rare. The starting point for reducing complexity is having a complete and up to date configuration document.

The problem with documentation is that it’s never complete and up to date, especially for a platform that offers the amount of configuration items like Citrix NetScaler.

The only solution for the problem at hand is the ability to automatically create instant reports of your configuration. Products like RES Software Automation Manager and Workspace Manager offer this functionality as a build-in feature called “Instant Report”. Unfortunately most software products do not offer this functionality and we need 3rd party solutions for it.
Carl Webster has created an amazing collection of automated documentation scripts for Citrix and Microsoft products like Active Directory, XenDesktop, XenApp et cetera. Carl offers it for free on his website. As Carl is not that into Citrix NetScaler this is not high on his list.

Carl’s documentation scripts

After talking to Carl on several occasions he convinced me to build a Citrix NetScaler documentation script based on his Microsoft PowerShell Script Template for generating documentation. Being able to use Carl’s Script Templates gives me the ability to focus just on the Citrix NetScaler part and have Carl worry about Word versions, language packs et cetera. Believe me there is a lot of work going into just starting Word from a PowerShell script.

Carl’s scripts are focused on Microsoft Windows based software products and uses PowerShell to run through the configuration. The first struggle is how to get from a Debian, the NetScaler base OS, based configuration to a Word document rendered by Microsoft Windows Powershell. Up till version 2.5 the NetScaler Documentation Script utilises the ns.conf as the source for the documentations script. As of version 3 we moved to the official NetScaler Nitro API.
The NetScaler Nitro API gives access to a lot more information as compared to the ns.conf and it’s also a lot easier to interpret data coming from the API.

The script

The Citrix NetScaler PowerShell scripts analyses the complete NetScaler configuration. The amount of lines in a Citrix NetScaler configuration file differ from a hundred to thousands of lines. The time we need to process this will take from a couple of minutes for most configurations to 20 minutes for the more extreme configurations. In this time it will create a Citrix NetScaler documentation document from thirty pages up to hundreds of pages. I’ve seen one example where it would go up to 1200 pages!

The NetScaler documentation that is generated is extremely detailed, it would go to far to list all the features but I will give an example. Per Load Balancer a chapter is created with basis Load Balancer Configuration, Services, Policies, URL redirections and advanced configuration.

Citrix NetScaler Documentation Load Balancer

 

 

 

 

 

 

 

Information

For more screenshots please check out the screenshots page

We are constantly working on adding new features and crushing whatever bugs there might still be. Yes unfortunately I’m not perfect. If there is anything at all please let me know in a comment or drop me an e-mail. Any type of response gives me the energy to pursue and push harder to improve the NetScaler documentation script.

As of August 26 2016 we released script version 3.5. This offers full support for all Citrix NetScaler versions up to version 11.1.

For a complete overview of all features please check out the release notes
For a complete overview of all the people involved please check out the team page! Without these people it wouldn’t be as good as it is now.
For links to the download pages check out the download page.

14 Responses to Citrix NetScaler documentation script

  1. Howard Weise says:

    This seems like a great tool. Just to confirm, it will document all features on an NS 10.1 at this point?

  2. Mark Kroehler says:

    Thanks to you, Iain and Carl for putting this together and maintaining it. Regarding a version for 10.5, are you planning on releasing an updated version of this script, or is the plan to move ahead to 11.0?

    Also, if you want another beta tester, let me know…

    • Hi Mark, We are actviely working on a new version which is going to be completely Nitro based. This way we have more information to be documented and we no longer need the ns.conf. This version will support 10.5 and 11:). After this release it will be much easier to update it for future NetScaler releases!

  3. Peter Ansink says:

    Hello Barry, liked our presentation on cugc about the new version of the netscaler documentation script. Can you tell me when it will be available ?

  4. Matt says:

    Hello
    When I run the script, I get the following error

    Invoke-RestMethod : Unable to connect to the remote server
    At C:\Users\o-nicolamc\Desktop\NetScaler_Script_v3_Signed.ps1:6969 char:25
    + $restResponse = Invoke-RestMethod @invokeRestMethodParams;
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : System.Net.WebException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

    I think it has something to do with the certificate warning when you try to connect to the net scaler.

    Running PoSH 5
    Nets caller 10.5

    • Jeppe Schoubye says:

      Hi Matt,
      You’re correct. The error is caused by the certificate warning. I fixed it by using the FQDN for the NetScaler which is correctly secured by a trusted certificate. So for the NSIP address I used the FQDN and then all was working. If I used the IP for the NSIP I would get an error as the cert is only securing the DNS name.
      Regards
      Jeppe

  5. Robert Schaaf says:

    the script only gives me chapters in the wordt document and no content. I use vpx 11.1. Maybe that is the issue?

    • Script should be working on both VPX and MPX, nitro engine is exactly the same. Can you send me the script output, not the document, in an e-mail so I can check what happens?

      • Robert says:

        sorry i should have mentioned that i resolved it, i forgot to use the SSL switch. i do get empty chapters still but not all of them. I assume that is because I use 11.1

      • Kwami Latortue says:

        I get the same issue. We use 11.0 69.12.nc.

        Could that be the problem? Thanks

  6. Jens says:

    The download of 3.5 is missing for some reasons. There’s still only 3.0 available.

  7. Paul says:

    when I ran the script in the Load Balancing section the IP address field was missing.
    there’s a typo in the script
    line 5078
    @{ Description = “IP”; Value = $LoadBalance.ipv46; }

    Should be
    @{ Description = “IP”; Value = $LoadBalancer.ipv46; }

    Then
    set-executionpolicy unrestricted
    as it breaks the code signing.
    Regards

    Paul

  8. Nazrul says:

    Hi,
    I am getting the error stated above:

    “Invoke-RestMethod : Unable to connect to the remote server
    At C:\SUPPORT\SCRIPTS\NETSCALER\NetScaler_Script_v3_6_Signed.ps1:2801 char:25”

    I can confirm I tried both NSIP and the FQDN.

    Any help would be greatly appreciated.

Leave a Reply