Forum Discussion

Mtollex70's avatar
Mtollex70
Brass Contributor
Dec 23, 2019

How to disable login for one server

Quick question: How do i disable logon for just one of many servers in a host pool? I tried Change Logon /Disable, but users are still getting redirected to the disabled server, only to get the error message "Remote logins disabled" ... Surely there must be a simple solution i have missed?

9 Replies

  • dgggg's avatar
    dgggg
    Copper Contributor

    yep there is (at the Session Host console)

    stop-service RDAgentBootLoader

     

    or as people say 

    Update-AzWvdSessionHost -HostPoolName MyPool -ResourceGroupName MyRG -Name SHost1 -AllowNewSession:$False -Force

     

    but you have to be authenticated to Azure

     

  • ritchnet's avatar
    ritchnet
    Copper Contributor
    Why don't you just disable new remote sessions via powershell?

    Set-RdsSessionHost -TenantName "TentantName" -HostPoolName "HostPoolName" -AllowNewSession $false -Name "SessionHostname"
  • Mtollex70 

     

    Hi,

     

    are you making use of the WVD azure app at all? 

     

    I find when i disable new sessions and de-allocate the machine users are not re directed to the drained resource. 

    • Mtollex70's avatar
      Mtollex70
      Brass Contributor

      WillSomerville Yes of course, when the host is deallocated, no one is redirected to that host. But i want to be able to have the machine running, but still disabled for logon.. Like you can do in a "regular" Remote Desktop deployment. 

      • WillSomerville's avatar
        WillSomerville
        Brass Contributor

        Mtollex70 

         

        Yeah i see your issue i suspect is it because the PAAS portion of the WVD can still communicate with the VM and its so its not looking for a variable of sorts to remove it as an active member of the pool. 

         

        Are you also running the WVD scaling powershell scripts? The variables on this could be causing it to route as you might be exceeding the CPU per session count on the VMs which are available in the pool 

         

        I have done some testing with my pools and have been able to take hosts out of my pools and it still allow me to log in without issue.  Below is the agent version in use on my pools. 

         

Resources