Jul 08 2019 03:26 AM - edited Jul 08 2019 04:43 AM
I'm trying to delete a test host pool that I created, but I'm unable to remove the session hosts. I have deleted the RemoteApps and the AppGroups, but when I try and delete the session host I get a powershell error:
WARNING: One or more errors occurred.
Remove-RdsSessionHost :
ActivityId:
Powershell commands to diagnose the failure:
Get-RdsDiagnosticActivities -ActivityId
At line:1 char:1
+ Remove-RdsSessionHost -TenantName $TenantName -HostPoolName $HostPool ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : FromStdErr: (Microsoft.RDInf...eRdsSessionHost:RemoveRdsSessionHost) [Remove-RdsSessionHost], RdsPowerShellException
+ FullyQualifiedErrorId : DefaultNoRdsError,Microsoft.RDInfra.RDPowershell.SessionHost.RemoveRdsSessionHost
I cant get any detail from the Get-RdsDiagnosticActivities command, as the activity doesn't appear for the command in the list.
The session host is there, I can see it using get-rdssession host, and I'm using the FQDN to try and delete, which exactly matches the SessionHostName that is outputted via the get command. If I use the shortname instead I get a different error saying "Specified SessionHostName %servname% does not exist in HostPoolName %hostpoolname%" (and that error is outputted into the RdsDiagnosticActivities)
Anyone run into this? I've tested creating a new host pool / session hosts, and the same is evident, I cannot remove the session hosts.
Thanks
Ben
Jul 12 2019 01:29 AM
Hi @Ben79,
Are there any special characters in the name?
Could you provide the full command that you try to execute?
Jul 12 2019 02:37 PM
Jul 22 2019 12:46 AM
Thanks for the response @michawets The session host name has a "-" in it, I don't know if that is causing any issues? The full command I'm trying is:
Remove-RdsSessionHost -TenantName "RDSTest" -HostPoolName "TestPool" -Name "RDSTEST-2012-1.eu.ad"
And that errors out with:
WARNING: One or more errors occurred.
Remove-RdsSessionHost :
ActivityId:
Powershell commands to diagnose the failure:
Get-RdsDiagnosticActivities -ActivityId
At line:1 char:1
+ Remove-RdsSessionHost -TenantName "RDSTest" -HostPoolName "Tes ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : FromStdErr: (Microsoft.RDInf...eRdsSessionHost:RemoveRdsSessionHost) [Remove-RdsSessionHost], RdsPowerShellException
+ FullyQualifiedErrorId : DefaultNoRdsError,Microsoft.RDInfra.RDPowershell.SessionHost.RemoveRdsSessionHost
If I mistype the session host name / dont use the FQDN then I get another error:
"Specified SessionHostName %%% does not exist in HostPoolName TestPool"
So its the correct name, but I've no idea why I cannot delete it. I'll attempt to create another session host today with no "-" in the name and see if i'm able to delete that host.
Jul 22 2019 12:47 AM
hey @anthonyschneider365, unfortunately not, the same error occurs using the -force
Jul 22 2019 04:01 AM
The "-" in the name is default when provisioning a host pool, which I had totally forgot. So that cant be anything to do with it. I've deployed another host pool into another tenant with corresponding session hosts, and the same issue is evident, I'm unable to remove them.
Using the web front end as well fails. "Failed to delete host, problem with server. Please try again"
Any help people can offer here would be appreciated, I've no idea what is going on.
Jul 22 2019 11:42 PM
Hi @Ben79 ,
Could you run a Get-RdsSessionHost for the same sessionhost? Could you post the output?
Thx
Jul 23 2019 05:35 AM
Hey @michawets here is the output:
Get-RdsSessionHost -TenantName $TenantName -HostPoolName $HostPoolName
SessionHostName : RDSTEST-2012-1.eu.ad
TenantName : RDSTest
TenantGroupName : Default Tenant Group
HostPoolName : TestWin2008Pool
AllowNewSession : True
Sessions : 0
LastHeartBeat : 23/07/2019 12:31:05
AgentVersion : 1.0.833.5
AssignedUser :
OsVersion : 6.3.9600
SxSStackVersion : rdp-sxs190429002
Status : Available
UpdateState : Succeeded
LastUpdateTime : 22/07/2019 12:10:09
UpdateErrorMessage :
Piping the Get-RdsSessionHost host command to a remove session host, provides the exact same error as well.
Jul 23 2019 05:52 AM
Hi @Ben79 ,
Could you install Fiddler?
Then
Could you share the outcome of the HTTP call?
Especially in the Inspectors, in the Response, the Raw output could be usefull
Jul 23 2019 07:29 AM
hey @michawets, please find below the output:
DELETE /RdsManagement/V1/TenantGroups/Default%20Tenant%20Group/Tenants/RDSTest/HostPools/TestWin2008Pool/SessionHosts/RDSTEST-2012-1.eu.ad?Force=False HTTP/1.1
The response is:
HTTP/1.1 404 Not Found
Text View =
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Jul 23 2019 09:39 AM
@Ben79 : Did the deletion work? Can you check that the host pool exists?
Jul 24 2019 02:50 AM
hey @Christian_Montoya, no the deletion didn't work. The session host is still present.
Jul 24 2019 08:33 AM
@Ben79 : Sorry, can you confirm what you mean? Are you saying
- The session host (in Windows Virtual Desktop) is still present? or...
- The virtual machine (in Azure) is still present?
I've looked at the backend and I no longer see the host pool and session hosts you created in Windows Virtual Desktop. However, Remove-RdsSessionHost does not delete the virtual machine in Azure, if that's what you were intending to do.
Jul 24 2019 11:30 PM
Hi @Christian_Montoya ,
I was wondering the same, that's why I asked @Ben79 to do the Get-RdsSessionHost (a few posts back).
And that seemed to be working.
@Ben79 , could you do a Get-RdsHostPool to validate the existence of the hostpool through Powershell?
Jul 26 2019 01:07 AM
Hello @michawets @Christian_Montoya
The session hosts and the VM's are still present after running the command. I didn’t realize you had access to the back end here, and so I had removed the company specific information from the commands I was running.
Below is the exact command / output I get:
Get-RdsSessionHost -TenantName "MonsterRDSTest" -HostPoolName "TestWin2008Pool"
SessionHostName : RDSTEST-2012-1.eu.global.ad
TenantName : MonsterRDSTest
TenantGroupName : Default Tenant Group
HostPoolName : TestWin2008Pool
AllowNewSession : True
Sessions : 0
LastHeartBeat : 23/07/2019 12:35:36
AgentVersion : 1.0.833.5
AssignedUser :
OsVersion : 6.3.9600
SxSStackVersion : rdp-sxs190429002
Status : NoHeartbeat
UpdateState : Succeeded
LastUpdateTime : 22/07/2019 12:10:09
UpdateErrorMessage :
Remove-RdsSessionHost -TenantName "MonsterRDSTest" -HostPoolName "TestWin2008Pool" -Name "RDSTEST-2012-1.eu.global.ad"
WARNING: One or more errors occurred.
Remove-RdsSessionHost :
ActivityId:
Powershell commands to diagnose the failure:
Get-RdsDiagnosticActivities -ActivityId
At line:1 char:1
+ Remove-RdsSessionHost -TenantName "MonsterRDSTest" -HostPoolName "Tes ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : FromStdErr: (Microsoft.RDInf...eRdsSessionHost:RemoveRdsSessionHost) [Remove-RdsSessionHost], RdsPowerShellException
+ FullyQualifiedErrorId : DefaultNoRdsError,Microsoft.RDInfra.RDPowershell.SessionHost.RemoveRdsSessionHost
Fiddler:
DELETE /RdsManagement/V1/TenantGroups/Default%20Tenant%20Group/Tenants/MonsterRDSTest/HostPools/TestWin2008Pool/SessionHosts/RDSTEST-2012-1.eu.global.ad?Force=False HTTP/1.1
HTTP/1.1 404 Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Thanks
Ben
Jul 26 2019 09:25 AM
@Ben79 : No worries. Also, if you would like to keep the tenant name and host pool names confidential, feel free to send in a private message.
When you run the Remove cmdlet, I noticed you're not using the "-Force" parameter. Does it immediately fail? Can you try running it with the "-Force" parameter, as well? If that works only with the "-Force" parameter, then we either need to make it more clear or actually allow the operation with confirmation.
Jul 29 2019 03:31 AM
Even using the -force it immediately fails with the exactly the same error.
Thanks
Ben
Aug 06 2019 03:19 AM
Does anyone have any ideas on this one? I'm utterly stuck and unable to make any more progress on the proof of concept of the tech.
Any light someone can throw I would appreciate.
Thanks
Jan 29 2020 01:35 PM
@Ben79 for whatever reason Microsoft has blocked the domain suffix 'ad' in their WVD deployment so you have to open a case any time you want to delete a Session host that uses that DNS suffix.
To speed things up reference Bug ID: 23462425
Here's the complete list of blocked suffixes in case it helps others:
<add fileExtension=".asa" allowed="false" />
<add fileExtension=".asax" allowed="false" />
<add fileExtension=".ascx" allowed="false" />
<add fileExtension=".master" allowed="false" />
<add fileExtension=".skin" allowed="false" />
<add fileExtension=".browser" allowed="false" />
<add fileExtension=".sitemap" allowed="false" />
<add fileExtension=".config" allowed="false" />
<add fileExtension=".cs" allowed="false" />
<add fileExtension=".csproj" allowed="false" />
<add fileExtension=".vb" allowed="false" />
<add fileExtension=".vbproj" allowed="false" />
<add fileExtension=".webinfo" allowed="false" />
<add fileExtension=".licx" allowed="false" />
<add fileExtension=".resx" allowed="false" />
<add fileExtension=".resources" allowed="false" />
<add fileExtension=".mdb" allowed="false" />
<add fileExtension=".vjsproj" allowed="false" />
<add fileExtension=".java" allowed="false" />
<add fileExtension=".jsl" allowed="false" />
<add fileExtension=".ldb" allowed="false" />
<add fileExtension=".dsdgm" allowed="false" />
<add fileExtension=".ssdgm" allowed="false" />
<add fileExtension=".lsad" allowed="false" />
<add fileExtension=".ssmap" allowed="false" />
<add fileExtension=".cd" allowed="false" />
<add fileExtension=".dsprototype" allowed="false" />
<add fileExtension=".lsaprototype" allowed="false" />
<add fileExtension=".sdm" allowed="false" />
<add fileExtension=".sdmDocument" allowed="false" />
<add fileExtension=".mdf" allowed="false" />
<add fileExtension=".ldf" allowed="false" />
<add fileExtension=".ad" allowed="false" />
<add fileExtension=".dd" allowed="false" />
<add fileExtension=".ldd" allowed="false" />
<add fileExtension=".sd" allowed="false" />
<add fileExtension=".adprototype" allowed="false" />
<add fileExtension=".lddprototype" allowed="false" />
<add fileExtension=".exclude" allowed="false" />
<add fileExtension=".refresh" allowed="false" />
<add fileExtension=".compiled" allowed="false" />
<add fileExtension=".msgx" allowed="false" />
<add fileExtension=".vsdisco" allowed="false" />
<add fileExtension=".rules" allowed="false" />
Mar 12 2020 06:05 AM
Solution
This worked for me and in this order.
Mar 12 2020 06:05 AM
Solution
This worked for me and in this order.