Forum Discussion
Unable to remove session host "Session host not found"
- Mar 12, 2020This worked for me and in this order. Add-RdsAccount -DeploymentUrl "https://rdbroker.wvd.microsoft.com"
 Set-RdsHostPool -TenantName $myTenantName -Name "contosoHostPool" -ValidationEnv $trueAdd-RdsAccount -DeploymentUrl "https://rdbroker-r0.wvd.microsoft.com"
Hi Ben79,
Are there any special characters in the name?
Could you provide the full command that you try to execute?
- Ben79Jul 22, 2019Copper ContributorThanks 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.RemoveRdsSessionHostIf 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. - Ben79Jul 22, 2019Copper ContributorThe "-" 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.