Home

How to disable login for one server

%3CLINGO-SUB%20id%3D%22lingo-sub-1078369%22%20slang%3D%22en-US%22%3EHow%20to%20disable%20login%20for%20one%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1078369%22%20slang%3D%22en-US%22%3E%3CP%3EQuick%20question%3A%20How%20do%20i%20disable%20logon%20for%20just%20one%20of%20many%20servers%20in%20a%20host%20pool%3F%20I%20tried%20Change%20Logon%20%2FDisable%2C%20but%20users%20are%20still%20getting%20redirected%20to%20the%20disabled%20server%2C%20only%20to%20get%20the%20error%20message%20%22Remote%20logins%20disabled%22%20...%20Surely%20there%20must%20be%20a%20simple%20solution%20i%20have%20missed%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1078402%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20disable%20login%20for%20one%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1078402%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F377587%22%20target%3D%22_blank%22%3E%40Mtollex70%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eare%20you%20making%20use%20of%20the%20WVD%20azure%20app%20at%20all%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20find%20when%20i%20disable%20new%20sessions%20and%20de-allocate%20the%20machine%20users%20are%20not%20re%20directed%20to%20the%20drained%20resource.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1078408%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20disable%20login%20for%20one%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1078408%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F480217%22%20target%3D%22_blank%22%3E%40WillSomerville%3C%2FA%3E%26nbsp%3BYes%20of%20course%2C%20when%20the%20host%20is%20deallocated%2C%20no%20one%20is%20redirected%20to%20that%20host.%20But%20i%20want%20to%20be%20able%20to%20have%20the%20machine%20running%2C%20but%20still%20disabled%20for%20logon..%20Like%20you%20can%20do%20in%20a%20%22regular%22%20Remote%20Desktop%20deployment.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1078436%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20disable%20login%20for%20one%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1078436%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F377587%22%20target%3D%22_blank%22%3E%40Mtollex70%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYeah%20i%20see%20your%20issue%20i%20suspect%20is%20it%20because%20the%20PAAS%20portion%20of%20the%20WVD%20can%20still%20communicate%20with%20the%20VM%20and%20its%20so%20its%20not%20looking%20for%20a%20variable%20of%20sorts%20to%20remove%20it%20as%20an%20active%20member%20of%20the%20pool.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20you%20also%20running%20the%20WVD%20scaling%20powershell%20scripts%3F%20The%20variables%20on%20this%20could%20be%20causing%20it%20to%20route%20as%20you%20might%20be%20exceeding%20the%20CPU%20per%20session%20count%20on%20the%20VMs%20which%20are%20available%20in%20the%20pool%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20done%20some%20testing%20with%20my%20pools%20and%20have%20been%20able%20to%20take%20hosts%20out%20of%20my%20pools%20and%20it%20still%20allow%20me%20to%20log%20in%20without%20issue.%26nbsp%3B%20Below%20is%20the%20agent%20version%20in%20use%20on%20my%20pools.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F162932iEC066A12D69B6679%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1078441%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20disable%20login%20for%20one%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1078441%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F480217%22%20target%3D%22_blank%22%3E%40WillSomerville%3C%2FA%3E%26nbsp%3BNo%20scaling%20scrips%20yet.%20As%20a%20%22workaround%22%20i%20too%20have%20taken%20machines%20out%20of%20the%20pool%20if%20i%20dont%20want%20anyone%20connecting%2C%20but%20its%20a%20hazzle%20to%20join%20them%20back%20in.%20Just%20wondered%20if%20there%20was%20a%20simple%20command%20or%20something%20to%20quickly%20disable%20%2F%20enable%20logons%20to%20a%20server%20in%20a%20WVD%20hostpool.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1078451%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20disable%20login%20for%20one%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1078451%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F377587%22%20target%3D%22_blank%22%3E%40Mtollex70%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHmm%20its%20odd%20for%20sure%20so%20just%20to%20clarify%20if%20you%20have%20the%20below%20set%20to%20no%20you%20still%20get%20the%20error%20right%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F162935iB44125EBEB5276C4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20thing%20that%20could%20possibly%20be%20a%20factor%20which%20i%20would%20deem%20as%20unlikely%20is%20the%20Remote%20desktop%20App%20version.%20Im%20on%20version%201.2.535.19507%20(x64)%20which%20is%20what%20my%20users%20are%20on.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20not%20tried%20this%20via%20the%20web%20if%20its%20something%20on%20the%20client%20side%20then%20it%20might%20be%20a%20case%20of%20having%20to%20update%20the%20client.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnother%20note%20is%20my%20RD%20gateways%20are%20in%20Europe%20west.%20do%20you%20know%20what%20gateway%20you%20are%20connecting%20too%3F%20I%20cant%20imagine%20this%20being%20a%20factor%20however%20i%20know%20that%20it%20appears%20to%20be%20working%20form%20this%20gateway.%20I%20had%20the%20issues%20when%20i%20was%20connected%20to%20the%20gateway%20services%20in%20the%20US.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3EWill%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1078460%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20disable%20login%20for%20one%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1078460%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F480217%22%20target%3D%22_blank%22%3E%40WillSomerville%3C%2FA%3E%26nbsp%3BTHERE%20it%20is!%20A%20quick%20way%20of%20disabling%20logon%20that%20i%20have%20missed%20%3A)%3C%2Fimg%3E%20But%20where%20in%20the%20portal%20is%20this%3F%20Is%20this%20the%20preview%20management%20console%20for%20WVD%3F%20I%20dont%20have%20that%20published%2C%20i%20tried%20an%20early%20version%20that%20did%20not%20work%2C%20but%20will%20try%20again%20just%20to%20get%20this%20feature%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1078508%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20disable%20login%20for%20one%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1078508%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F377587%22%20target%3D%22_blank%22%3E%40Mtollex70%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThats%20correct%20it%20is%20the%20WVD%20management%20portal%20it%20is%20a%20break%20fix%20as%20such%20until%20the%20actual%20portal%20is%20released%20sometime%20in%20the%20new%20year%20%3A)%3C%2Fimg%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FRDS-Templates%2Ftree%2Fmaster%2Fwvd-templates%2Fwvd-management-ux%2Fdeploy%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FAzure%2FRDS-Templates%2Ftree%2Fmaster%2Fwvd-templates%2Fwvd-management-ux%2Fdeploy%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20above%20link%20is%20where%20i%20went%20to%20deploy%20the%20WVD%20portal%20and%20this%20worked%20without%20issue.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ejust%20make%20sure%20that%20any%20users%20you%20want%20to%20be%20able%20to%20view%20this%20are%20added%20to%20the%20application%20that%20you%20create%20in%20enterprise%20applications.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3EWill%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1082867%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20disable%20login%20for%20one%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1082867%22%20slang%3D%22en-US%22%3EWhy%20don't%20you%20just%20disable%20new%20remote%20sessions%20via%20powershell%3F%3CBR%20%2F%3E%3CBR%20%2F%3ESet-RdsSessionHost%20-TenantName%20%22TentantName%22%20-HostPoolName%20%22HostPoolName%22%20-AllowNewSession%20%24false%20-Name%20%22SessionHostname%22%3C%2FLINGO-BODY%3E
Highlighted
Contributor

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?

8 Replies
Highlighted

@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. 

Highlighted

@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. 

Highlighted

@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. 

 

clipboard_image_0.png

Highlighted

@WillSomerville No scaling scrips yet. As a "workaround" i too have taken machines out of the pool if i dont want anyone connecting, but its a hazzle to join them back in. Just wondered if there was a simple command or something to quickly disable / enable logons to a server in a WVD hostpool. 

Highlighted

@Mtollex70 

Hmm its odd for sure so just to clarify if you have the below set to no you still get the error right?

 

clipboard_image_0.png

 

The only thing that could possibly be a factor which i would deem as unlikely is the Remote desktop App version. Im on version 1.2.535.19507 (x64) which is what my users are on. 

 

I have not tried this via the web if its something on the client side then it might be a case of having to update the client. 

 

Another note is my RD gateways are in Europe west. do you know what gateway you are connecting too? I cant imagine this being a factor however i know that it appears to be working form this gateway. I had the issues when i was connected to the gateway services in the US.

 

Cheers

Will 

Highlighted

@WillSomerville THERE it is! A quick way of disabling logon that i have missed :) But where in the portal is this? Is this the preview management console for WVD? I dont have that published, i tried an early version that did not work, but will try again just to get this feature :)

Highlighted

@Mtollex70 

 

Thats correct it is the WVD management portal it is a break fix as such until the actual portal is released sometime in the new year :) 

 

https://github.com/Azure/RDS-Templates/tree/master/wvd-templates/wvd-management-ux/deploy

 

The above link is where i went to deploy the WVD portal and this worked without issue. 

 

just make sure that any users you want to be able to view this are added to the application that you create in enterprise applications.

 

Cheers

Will 

Highlighted
Why don't you just disable new remote sessions via powershell?

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