Note: This blog contains screenshots and references to an older version of Ivanti Automation which was developed by a company called RES Software that was aquired by Invanti.

Introduction

XenApp server maintenance is a necessary part of managing a Citrix farm (unless you are using Provisioning Services?).  We use Wisdom (which I will detail in a later post) to perform an elaborate, reoccurring maintenance reboot job on our servers.  Part of the maintenance job is to disable Terminal Server logins when the job starts and enable them when the job completes.  Naturally, Murphy’s Law is in effect all the time when it comes to Citrix servers, so the maintenance job will not complete on a couple of servers and they will have their logins disabled when users start to login.  For this post, I’m going to detail a simple Wisdom module that you can schedule to run ‘in the morning’ that will send you an e-mail alert for any servers that have their logins disabled.


Wisdom Module Overview

The module consists of 2 actions:

image7

With these module parameters:

image8

  • SERVERNAME will be set to the %COMPUTERNAME% environment variable of the server the module is run against.
  • SecurityContext is used for the E-mail task
  • LoginsDisabled is a conditional parameter that we use to determine whether to send an e-mail or not.

Wisdom Module Detail

Query Registry Settings

The first task simply examines the WinStationsDisabled value for the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

If the value is 1, then we’ll set our Wisdom parameter LoginsDisabled to 1, otherwise, it is 0.

image9

Send E-mail

The second task runs if the LoginsDisabled parameter is equal to 1, otherwise skip this task.

image10

Here are the e-mail settings so you can see how the SERVERNAME parameter is used:

image11

Building block available here. You can also follow more discussion at the Res Software User Group forums.

Value for Value

If you received any value from reading this post, please help by becoming a supporter.

Thanks for reading,
Alain