How To Create and Apply Reboot Schedules in XenApp 7.6

How To Create and Apply Reboot Schedules in XenApp 7.6

book

Article ID: CTX208524

calendar_today

Updated On:

Description

This document has instructions to create and apply reboot schedules in XenApp 7.x versions.


Instructions

Ability to disable access to offline server

Logon mode for RDP is per-server configuration that is stored in the registry. Configuration of logon mode is stored in the registry in two different locations:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\TSServerDrainMode

0 = Allow all connections
1 = Allow reconnections, but prevent new logon until reboot
2 = Allow reconnections, but prevent new logon

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\WinStationsDisabled
0 = Enabled
1 = Disabled

When server is in drain mode, WinStationDisabled is always 0 (enabled).

XenApp logon control is managed through data store and is updated using LHC synchronization notification. So when you change the logon mode in console, this change is actually not immediately done on the registry of the target machine. When XenApp server is offline and you change the logon mode, it will get notification from data store during boot and automatically apply the logon mode that you’ve configured in the console. This allows you to change logon mode even while server is offline.

Temporary drain mode (Prohibit logons until server restart) is however available only when server is online.

Logon Mode in PowerShell

Especially in larger and more dynamic environments, it’s very common to automate the whole maintenance process. If you want to automate assignment of logon modes, there are two commands that you can use:
To assign logon mode to server:

Set-XAServerLogOnMode -LogOnMode $LogonMode -ServerName $Server

Since logon mode is enumeration, you can use this universal method to get all allowed values:

[Enum]::GetValues(“Citrix.XenApp.Commands.LogOnMode”)

The following are all the allowed values for $LogonMode:

  • AllowLogOns
  • ProhibitNewLogOnsUntilRestart
  • ProhibitNewLogOns
  • ProhibitLogOns

To get logon mode assigned to server, it is one of the properties of the regular server object:

$(Get-XAServer -ServerName $Server).LogonMode

Summary

  • Usage of custom load evaluator was just a workaround to provide required functionality in older versions of XenApp, however with availability of logon modes there is no reason to use the old approach.

  • Administrators still get RDP access to disabled servers to perform administrative tasks.

  • Since logon mode is implemented through IMA, it is possible to disable server even if it is offline.

Note: For additional information refer to Citrix eDocs.

Issue/Introduction

This document has instructions to create and apply reboot schedules in XenApp 7.6