Convert-xRDS_DrainMode.ps1
function Convert-xRDS_DrainMode ([Parameter(Mandatory=$true)][int]$ObjectId) { # Convert user's session TSProtocol into user friendly name [string]$OutInfo = $null; switch ($ObjectId) { 0 {$OutInfo = "OFF"} 1 {$OutInfo = "UNTIL REBOOT"} 2 {$OutInfo = "ON"} default {$OutInfo = "Unknown"} } return $OutInfo } |