Application virtualization, IoT and Cloud Computing, Blog of Sacha Thomet

Finally 1.0 – but never finalized!

In November 2014 I created the blog post about the adaption of the PVS Script for XenApp/XenDesktop 7.x :
XenDesktop & XenApp FMA (7.x) HealthCheck – Oops!… I Did It Again

sheepsNow after almost two years of continuous development on this Script, the XenApp & XenDesktop 7.x Health Check has now Version 1.0.

I started this script in a very basic version and in the meanwhile lot of tester and contributors helped to bring this script in this version. Just this year I started with GitHub and it’s surprising, the community who helped is awesome!

Now after a number of 0.x versions, just at the point we introduce the XML configuration file, I can say the version now has deserved the number 1.00.

xaxd-xml

The big benefit of the configuration in the XML file is in case you have multiple environments with the script you don’t need to edit the header section of the script which has earlier contained the config. On a new version of the script, you just replace the script in your environments and keep the XML file.

The XML file and the script need to be in the same directory and the Name of the XML file need to be same like the script, e.g:

XA-and-XD-HealthCheck.ps1
XA-and-XD-HealthCheck_Parameters.xml

The XML-Config is introduced to this script by Stefan Beckmann (Twitter: @alphasteff)

github

The newest version of the script you can find on GitHub:
https://github.com/sacha81/XA-and-XD-HealthCheck 

html script output

The HTML Output file gained some more input, even it was difficult to decide which feature request to consider and which not.

We check now CPU, Memory and disk space of controllers and workers (XenApp Server and XenDesktop VDIs). Because I learned last month’s that with 7.x and the FMA architecture it’s really possible that an environment contains number of different VDA versions, I also added this info. And for troubleshooting reason I assumed that it would be helpful to have also the hypervisor host information on this output.

The code is on GitHub:

https://github.com/sacha81/XA-and-XD-HealthCheck/

For Bug Reports or feature Request please use GitHub, of course you can also contribute on this code!

21 Responses to Finally 1.0 – but never finalized!

  • Hoi Sacha
    Dein Health Check Tool habe ich soeben auf einer produktiven XenDesektop HDX 3D Umgebung getestet. Gute Tool, das auch auf Anhieb funktioniert. Auf unserer XenApp Cloud werde ich auch noch testen.
    Für XenDesktop wäre noch sehr dienlich, wenn der Grafikmode noch sichtbar wäre. (legacy Grafik, Thinwire, Thinwire plus, H.264,Framehawk, usw.). Für HDX 3d Pro User wäre es auch noch nützlich das aktive NVIDIA Profil zu sehen.

    Dies als Vorschläge für die nächsten Versionen.

    Gruss Mario

    • Ich weiss nicht ob das einfach so geht, da dies nicht direkt auf die Maschine verknüpft ist sondern per Policy kommt. Ich nehm’s mal im Git auf die Feature-Request-Liste. Der RemoteDisplayAnyalyzer von Barry Schiffer und Brahm Wolfs kennst du sicher – der ist Hammer zum Sachen im Bereich Grafik zu testen.

      • Der ist im Einsatz. Nätürlich muss die Info nicht so tief wie das Tool gehen. Es geht mehr darum, eine Übersicht zu haben, ob der User im richtigen Grafikmode arbeitet, d.h. Remote im Compatibility Mode und lokal H.264.

        • Ich habe mal eine erste Version gemacht, ist nicht ganz Trivial … möchtest du testen? Dann kann ich dir den Code mal vorab per Mail senden.
          Bedingungen dass es klappt: 1. User muss angemeldet sein. 2. Maschine muss per RPC erreichbar sein (wie alle Detail-Checks).

        • Wieso nicht für alles Selective H264?

    • Ist nun ab Version 1.2.1 drin – danke für den Input.

  • Hello Sacha,

    looooook decent:)
    Can you please explain me How XML file is important?
    Secondly i need to tweak or make some additional output.. does it require to modify both files?

    Kr, Rakesh

    • You need that to configure the behaviour of your Script, have a look into the XML and you will see your options to configure.

  • such as add email address

  • Hi Sacha,

    Thank you for the script.
    I have tried to run it but get the following errors:

    New-Variable : Cannot overwrite variable EnvironmentName because the variable has been optimized. Try using the
    New-Variable or Set-Variable cmdlet (without any aliases), or dot-source the command that you are using to set the
    variable.
    At C:ToolsXA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:80 char:26
    + If ($CreateVariable) { New-Variable -Name $_.Name -Value $VarValue -Scope $_.S …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (EnvironmentName:String) [New-Variable], SessionStateUnauthorizedAccessExcep
    tion
    + FullyQualifiedErrorId : VariableNotWritableRare,Microsoft.PowerShell.Commands.NewVariableCommand

    New-Variable : Cannot overwrite variable ShowXenAppTable because the variable has been optimized. Try using the
    New-Variable or Set-Variable cmdlet (without any aliases), or dot-source the command that you are using to set the
    variable.
    At C:ToolsXA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:80 char:26
    + If ($CreateVariable) { New-Variable -Name $_.Name -Value $VarValue -Scope $_.S …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (ShowXenAppTable:String) [New-Variable], SessionStateUnauthorizedAccessExcep
    tion
    + FullyQualifiedErrorId : VariableNotWritableRare,Microsoft.PowerShell.Commands.NewVariableCommand

    New-Variable : Cannot overwrite variable PvsWriteMaxSize because the variable has been optimized. Try using the
    New-Variable or Set-Variable cmdlet (without any aliases), or dot-source the command that you are using to set the
    variable.
    At C:ToolsXA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:80 char:26
    + If ($CreateVariable) { New-Variable -Name $_.Name -Value $VarValue -Scope $_.S …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (PvsWriteMaxSize:String) [New-Variable], SessionStateUnauthorizedAccessExcep
    tion
    + FullyQualifiedErrorId : VariableNotWritableRare,Microsoft.PowerShell.Commands.NewVariableCommand

    The variable ‘$PvsWriteMaxSize’ cannot be retrieved because it has not been set.
    At C:ToolsXA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:87 char:20
    + $PvsWriteMaxSize = $PvsWriteMaxSize * 1Gb
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (PvsWriteMaxSize:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined

  • XenAppTable is not showing for me. Both files are at same folder and Parameters file is correctly filled out.

    Error:
    =================
    New-Variable or Set-Variable cmdlet (without any aliases), or dot-source the command that you are using to set the
    variable.
    At D:XA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:80 char:26
    + If ($CreateVariable) { New-Variable -Name $_.Name -Value $VarValue -Scope $_.S …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (EnvironmentName:String) [New-Variable], SessionStateUnauthorizedAccessExcep
    tion
    + FullyQualifiedErrorId : VariableNotWritableRare,Microsoft.PowerShell.Commands.NewVariableCommand

    New-Variable : Cannot overwrite variable ShowXenAppTable because the variable has been optimized. Try using the
    New-Variable or Set-Variable cmdlet (without any aliases), or dot-source the command that you are using to set the
    variable.
    At D:XA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:80 char:26
    + If ($CreateVariable) { New-Variable -Name $_.Name -Value $VarValue -Scope $_.S …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (ShowXenAppTable:String) [New-Variable], SessionStateUnauthorizedAccessExcep
    tion
    + FullyQualifiedErrorId : VariableNotWritableRare,Microsoft.PowerShell.Commands.NewVariableCommand

    New-Variable : Cannot overwrite variable PvsWriteMaxSize because the variable has been optimized. Try using the
    New-Variable or Set-Variable cmdlet (without any aliases), or dot-source the command that you are using to set the
    variable.
    At D:XA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:80 char:26
    + If ($CreateVariable) { New-Variable -Name $_.Name -Value $VarValue -Scope $_.S …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (PvsWriteMaxSize:String) [New-Variable], SessionStateUnauthorizedAccessExcep
    tion
    + FullyQualifiedErrorId : VariableNotWritableRare,Microsoft.PowerShell.Commands.NewVariableCommand

    The variable ‘$PvsWriteMaxSize’ cannot be retrieved because it has not been set.
    At D:XA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:87 char:20
    + $PvsWriteMaxSize = $PvsWriteMaxSize * 1Gb
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (PvsWriteMaxSize:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined

    The variable ‘$ShowXenAppTable’ cannot be retrieved because it has not been set.
    At D:XA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:987 char:4
    + if($ShowXenAppTable -eq 1 ) {
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (ShowXenAppTable:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined

    The variable ‘$EnvironmentName’ cannot be retrieved because it has not been set.
    At D:XA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:1241 char:21
    + $EnvironmentName = “$ $XDVersion”
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (EnvironmentName:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined

    The variable ‘$ShowXenAppTable’ cannot be retrieved because it has not been set.
    At D:XA-and-XD-HealthCheck-masterXA-and-XD-HealthCheck.ps1:1264 char:5
    + if($ShowXenAppTable -eq 1 ) {
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (ShowXenAppTable:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined

  • hallo sascha
    blöde frage, kann ich mehrere email absender eintragen? finde nicht raus wie das gehen soll. kannst mir weiter helfen?
    das script is ansonsten genial

    • 1. Es gibt keine blöden Fragen.

      2. Willst du aber mehrere Ziel-Adressen eintragen? Richtig? Dann geht das so:



      emailTo
      [email protected],[email protected]
      [string]
      Script

      • hallo sacha

        hmm ich war mir fast sicher, das ich es so probiert hatte, ging dann nicht, hab es jetzt nochmal getestet, mit 3 email empfängern nur mit komma getrennt, nun geht es, cool, dann lass ich das geile script mal per task durchheizen. merci vielmol, für des coole script! gruss frank

Leave a Reply

Your email address will not be published. Required fields are marked *