Programmatically setting Maintenance mode in CVAD

Programmatically setting Maintenance mode in CVAD

book

Article ID: CTX137373

calendar_today

Updated On:

Description

This article lists the three ways in which you can programmatically set desktops in a XenDesktop environment into maintenance mode.

Background

The Administrators would like to prevent user connection to the Virtual Delivery Agents while the maintenance period is in effect.

Requirements

The following procedures require the use of  PowerShell Cmdlets.


Instructions

Maintenance mode can be configured in the following ways:

  • Set maintenance mode on a single desktop machine through the Set-BrokerPrivateDesktop or Set-BrokerSharedDesktop cmdlets (or the equivalent app desktop cmdlets) with the -InMaintenanceMode parameters to the preceding cmdlets.

  • Set maintenance mode on a desktop group (which affects all the desktops in that group) through the Set-BrokerDesktopGroup cmdlet, again with the -InMaintenanceMode parameters to preceding cmdlet.

  • Set maintenance mode on a hypervisor connection through the Set-Item cmdlet on the appropriate pseudo drive item. For example Set-Item  -LiteralPath @("XDHyp:\Connections\<HypConnectionName>") -MaintenanceMode <$true/$false>

Issue/Introduction

This article lists the three ways in which you can programmatically set desktops in a XenDesktop 5.6.x environment into maintenance mode.