Home

Unable to remove session host "Session host not found"

%3CLINGO-SUB%20id%3D%22lingo-sub-742166%22%20slang%3D%22en-US%22%3EUnable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-742166%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20delete%20a%20test%20host%20pool%20that%20I%20created%2C%20but%20I'm%20unable%20to%20remove%20the%20session%20hosts.%20I%20have%20deleted%20the%20RemoteApps%20and%20the%20AppGroups%2C%20but%20when%20I%20try%20and%20delete%20the%20session%20host%20I%20get%20a%20powershell%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWARNING%3A%20One%20or%20more%20errors%20occurred.%3CBR%20%2F%3ERemove-RdsSessionHost%20%3A%3CBR%20%2F%3EActivityId%3A%3CBR%20%2F%3EPowershell%20commands%20to%20diagnose%20the%20failure%3A%3CBR%20%2F%3EGet-RdsDiagnosticActivities%20-ActivityId%3CBR%20%2F%3EAt%20line%3A1%20char%3A1%3CBR%20%2F%3E%2B%20Remove-RdsSessionHost%20-TenantName%20%24TenantName%20-HostPoolName%20%24HostPool%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20FromStdErr%3A%20(Microsoft.RDInf...eRdsSessionHost%3ARemoveRdsSessionHost)%20%5BRemove-RdsSessionHost%5D%2C%20RdsPowerShellException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20DefaultNoRdsError%2CMicrosoft.RDInfra.RDPowershell.SessionHost.RemoveRdsSessionHost%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20cant%20get%20any%20detail%20from%20the%20Get-RdsDiagnosticActivities%20command%2C%20as%20the%20activity%20doesn't%20appear%20for%20the%20command%20in%20the%20list.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20session%20host%20is%20there%2C%20I%20can%20see%20it%20using%20get-rdssession%20host%2C%20and%20I'm%20using%20the%20FQDN%20to%20try%20and%20delete%2C%20which%20exactly%20matches%20the%20SessionHostName%20that%20is%20outputted%20via%20the%20get%20command.%20If%20I%20use%20the%20shortname%20instead%20I%20get%20a%20different%20error%20saying%20%22Specified%20SessionHostName%20%25servname%25%20does%20not%20exist%20in%20HostPoolName%20%25hostpoolname%25%22%20(and%20that%20error%20is%20outputted%20into%20the%20RdsDiagnosticActivities)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyone%20run%20into%20this%3F%20I've%20tested%20creating%20a%20new%20host%20pool%20%2F%20session%20hosts%2C%20and%20the%20same%20is%20evident%2C%20I%20cannot%20remove%20the%20session%20hosts.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBen%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-751766%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-751766%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346445%22%20target%3D%22_blank%22%3E%40Ben79%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20there%20any%20special%20characters%20in%20the%20name%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20provide%20the%20full%20command%20that%20you%20try%20to%20execute%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-753035%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-753035%22%20slang%3D%22en-US%22%3EDoes%20the%20command%20succeed%20using%20-Force%20or%20is%20the%20same%20error%20thrown%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-767031%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-767031%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20response%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F298270%22%20target%3D%22_blank%22%3E%40michawets%3C%2FA%3E%26nbsp%3BThe%20session%20host%20name%20has%20a%20%22-%22%20in%20it%2C%20I%20don't%20know%20if%20that%20is%20causing%20any%20issues%3F%20The%20full%20command%20I'm%20trying%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERemove-RdsSessionHost%20-TenantName%20%22RDSTest%22%20-HostPoolName%20%22TestPool%22%20-Name%20%22RDSTEST-2012-1.eu.ad%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20that%20errors%20out%20with%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWARNING%3A%20One%20or%20more%20errors%20occurred.%3CBR%20%2F%3ERemove-RdsSessionHost%20%3A%3CBR%20%2F%3EActivityId%3A%3CBR%20%2F%3EPowershell%20commands%20to%20diagnose%20the%20failure%3A%3CBR%20%2F%3EGet-RdsDiagnosticActivities%20-ActivityId%3CBR%20%2F%3EAt%20line%3A1%20char%3A1%3CBR%20%2F%3E%2B%20Remove-RdsSessionHost%20-TenantName%20%22RDSTest%22%20-HostPoolName%20%22Tes%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20FromStdErr%3A%20(Microsoft.RDInf...eRdsSessionHost%3ARemoveRdsSessionHost)%20%5BRemove-RdsSessionHost%5D%2C%20RdsPowerShellException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20DefaultNoRdsError%2CMicrosoft.RDInfra.RDPowershell.SessionHost.RemoveRdsSessionHost%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20mistype%20the%20session%20host%20name%20%2F%20dont%20use%20the%20FQDN%20then%20I%20get%20another%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22Specified%20SessionHostName%20%25%25%25%20does%20not%20exist%20in%20HostPoolName%20TestPool%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20its%20the%20correct%20name%2C%20but%20I've%20no%20idea%20why%20I%20cannot%20delete%20it.%20I'll%20attempt%20to%20create%20another%20session%20host%20today%20with%20no%20%22-%22%20in%20the%20name%20and%20see%20if%20i'm%20able%20to%20delete%20that%20host.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-767032%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-767032%22%20slang%3D%22en-US%22%3E%3CP%3Ehey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F309010%22%20target%3D%22_blank%22%3E%40anthonyschneider365%3C%2FA%3E%2C%26nbsp%3Bunfortunately%20not%2C%20the%20same%20error%20occurs%20using%20the%20-force%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-767351%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-767351%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20%22-%22%20in%20the%20name%20is%20default%20when%20provisioning%20a%20host%20pool%2C%20which%20I%20had%20totally%20forgot.%20So%20that%20cant%20be%20anything%20to%20do%20with%20it.%20I've%20deployed%20another%20host%20pool%20into%20another%20tenant%20with%20corresponding%20session%20hosts%2C%20and%20the%20same%20issue%20is%20evident%2C%20I'm%20unable%20to%20remove%20them.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUsing%20the%20web%20front%20end%20as%20well%20fails.%20%22Failed%20to%20delete%20host%2C%20problem%20with%20server.%20Please%20try%20again%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20people%20can%20offer%20here%20would%20be%20appreciated%2C%20I've%20no%20idea%20what%20is%20going%20on.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-769034%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-769034%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346445%22%20target%3D%22_blank%22%3E%40Ben79%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20run%20a%20Get-%3CSPAN%3ERdsSessionHost%20for%20the%20same%20sessionhost%3F%20Could%20you%20post%20the%20output%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThx%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-769464%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-769464%22%20slang%3D%22en-US%22%3E%3CP%3EHey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F298270%22%20target%3D%22_blank%22%3E%40michawets%3C%2FA%3E%26nbsp%3Bhere%20is%20the%20output%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGet-RdsSessionHost%20-TenantName%20%24TenantName%20-HostPoolName%20%24HostPoolName%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESessionHostName%20%3A%20RDSTEST-2012-1.eu.ad%3CBR%20%2F%3ETenantName%20%3A%20RDSTest%3CBR%20%2F%3ETenantGroupName%20%3A%20Default%20Tenant%20Group%3CBR%20%2F%3EHostPoolName%20%3A%20TestWin2008Pool%3CBR%20%2F%3EAllowNewSession%20%3A%20True%3CBR%20%2F%3ESessions%20%3A%200%3CBR%20%2F%3ELastHeartBeat%20%3A%2023%2F07%2F2019%2012%3A31%3A05%3CBR%20%2F%3EAgentVersion%20%3A%201.0.833.5%3CBR%20%2F%3EAssignedUser%20%3A%3CBR%20%2F%3EOsVersion%20%3A%206.3.9600%3CBR%20%2F%3ESxSStackVersion%20%3A%20rdp-sxs190429002%3CBR%20%2F%3EStatus%20%3A%20Available%3CBR%20%2F%3EUpdateState%20%3A%20Succeeded%3CBR%20%2F%3ELastUpdateTime%20%3A%2022%2F07%2F2019%2012%3A10%3A09%3CBR%20%2F%3EUpdateErrorMessage%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPiping%20the%20Get-RdsSessionHost%20host%20command%20to%20a%20remove%20session%20host%2C%20provides%20the%20exact%20same%20error%20as%20well.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-769522%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-769522%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346445%22%20target%3D%22_blank%22%3E%40Ben79%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20install%20Fiddler%3F%3C%2FP%3E%3CP%3EThen%3C%2FP%3E%3CUL%3E%3CLI%3Eclose%20Powershell%3C%2FLI%3E%3CLI%3Estart%20Fiddler%3C%2FLI%3E%3CLI%3Estart%20Powershell%3C%2FLI%3E%3CLI%3Eredo%20the%20Remove-RdsSessionHost%3C%2FLI%3E%3CLI%3Echeck%20the%20Fiddler%20output%2C%20looking%20for%20a%20call%20to%26nbsp%3B%3CSTRONG%3ETenantGroups%2F%7BtenantGroupName%7D%2FTenants%2F%7BtenantName%7D%2FHostPools%2F%7BhostPoolName%7D%2FSessionHosts%2F%7BsessionHostName%7D%3C%2FSTRONG%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3ECould%20you%20share%20the%20outcome%20of%20the%20HTTP%20call%3F%3C%2FP%3E%3CP%3EEspecially%20in%20the%20Inspectors%2C%20in%20the%20Response%2C%20the%20Raw%20output%20could%20be%20usefull%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-769800%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-769800%22%20slang%3D%22en-US%22%3E%3CP%3Ehey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F298270%22%20target%3D%22_blank%22%3E%40michawets%3C%2FA%3E%2C%26nbsp%3Bplease%20find%20below%20the%20output%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDELETE%20%2FRdsManagement%2FV1%2FTenantGroups%2FDefault%2520Tenant%2520Group%2FTenants%2FRDSTest%2FHostPools%2FTestWin2008Pool%2FSessionHosts%2FRDSTEST-2012-1.eu.ad%3FForce%3DFalse%20HTTP%2F1.1%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20response%20is%3A%3C%2FP%3E%3CP%3EHTTP%2F1.1%20404%20Not%20Found%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EText%20View%20%3D%3C%2FP%3E%3CP%3EThe%20resource%20you%20are%20looking%20for%20has%20been%20removed%2C%20had%20its%20name%20changed%2C%20or%20is%20temporarily%20unavailable.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-770083%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-770083%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346445%22%20target%3D%22_blank%22%3E%40Ben79%3C%2FA%3E%26nbsp%3B%3A%20Did%20the%20deletion%20work%3F%20Can%20you%20check%20that%20the%20host%20pool%20exists%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-771215%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-771215%22%20slang%3D%22en-US%22%3E%3CP%3Ehey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F305776%22%20target%3D%22_blank%22%3E%40christianmontoya%3C%2FA%3E%2C%20no%20the%20deletion%20didn't%20work.%20The%20session%20host%20is%20still%20present.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-771833%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-771833%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346445%22%20target%3D%22_blank%22%3E%40Ben79%3C%2FA%3E%26nbsp%3B%3A%20Sorry%2C%20can%20you%20confirm%20what%20you%20mean%3F%20Are%20you%20saying%3C%2FP%3E%0A%3CP%3E-%20The%26nbsp%3B%3CSTRONG%3Esession%20host%3C%2FSTRONG%3E%26nbsp%3B(in%20Windows%20Virtual%20Desktop)%20is%20still%20present%3F%20or...%3C%2FP%3E%0A%3CP%3E-%20The%26nbsp%3B%3CSTRONG%3Evirtual%20machine%3C%2FSTRONG%3E(in%20Azure)%20is%20still%20present%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI've%20looked%20at%20the%20backend%20and%20I%20no%20longer%20see%20the%20host%20pool%20and%20session%20hosts%20you%20created%20in%20Windows%20Virtual%20Desktop.%20However%2C%26nbsp%3B%3CSTRONG%3ERemove-RdsSessionHost%3C%2FSTRONG%3Edoes%20not%20delete%20the%20virtual%20machine%20in%20Azure%2C%20if%20that's%20what%20you%20were%20intending%20to%20do.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-772880%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-772880%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F305776%22%20target%3D%22_blank%22%3E%40christianmontoya%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20wondering%20the%20same%2C%20that's%20why%20I%20asked%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346445%22%20target%3D%22_blank%22%3E%40Ben79%3C%2FA%3E%26nbsp%3Bto%20do%20the%20Get-RdsSessionHost%20(a%20few%20posts%20back).%3C%2FP%3E%3CP%3EAnd%20that%20seemed%20to%20be%20working.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346445%22%20target%3D%22_blank%22%3E%40Ben79%3C%2FA%3E%26nbsp%3B%2C%20could%20you%20do%20a%20Get-RdsHostPool%20to%20validate%20the%20existence%20of%20the%20hostpool%20through%20Powershell%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-774681%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774681%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F298270%22%20target%3D%22_blank%22%3E%40michawets%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F305776%22%20target%3D%22_blank%22%3E%40christianmontoya%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20session%20hosts%20and%20the%20VM's%20are%20still%20present%20after%20running%20the%20command.%20I%20didn%E2%80%99t%20realize%20you%20had%20access%20to%20the%20back%20end%20here%2C%20and%20so%20I%20had%26nbsp%3Bremoved%20the%20company%20specific%20information%20from%20the%20commands%20I%20was%20running.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBelow%20is%20the%20%3CU%3Eexact%3C%2FU%3Ecommand%20%2F%20output%20I%20get%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EGet-RdsSessionHost%20-TenantName%20%22MonsterRDSTest%22%20-HostPoolName%20%22TestWin2008Pool%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESessionHostName%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20RDSTEST-2012-1.eu.global.ad%3C%2FP%3E%3CP%3ETenantName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20MonsterRDSTest%3C%2FP%3E%3CP%3ETenantGroupName%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20Default%20Tenant%20Group%3C%2FP%3E%3CP%3EHostPoolName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20TestWin2008Pool%3C%2FP%3E%3CP%3EAllowNewSession%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%3A%20True%3C%2FP%3E%3CP%3ESessions%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%200%3C%2FP%3E%3CP%3ELastHeartBeat%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%2023%2F07%2F2019%2012%3A35%3A36%3C%2FP%3E%3CP%3EAgentVersion%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%201.0.833.5%3C%2FP%3E%3CP%3EAssignedUser%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%3C%2FP%3E%3CP%3EOsVersion%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%206.3.9600%3C%2FP%3E%3CP%3ESxSStackVersion%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20rdp-sxs190429002%3C%2FP%3E%3CP%3EStatus%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20NoHeartbeat%3C%2FP%3E%3CP%3EUpdateState%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20Succeeded%3C%2FP%3E%3CP%3ELastUpdateTime%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%2022%2F07%2F2019%2012%3A10%3A09%3C%2FP%3E%3CP%3EUpdateErrorMessage%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ERemove-RdsSessionHost%20-TenantName%20%22MonsterRDSTest%22%20-HostPoolName%20%22TestWin2008Pool%22%20-Name%20%22RDSTEST-2012-1.eu.global.ad%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWARNING%3A%20One%20or%20more%20errors%20occurred.%3C%2FP%3E%3CP%3ERemove-RdsSessionHost%20%3A%3C%2FP%3E%3CP%3EActivityId%3A%3C%2FP%3E%3CP%3EPowershell%20commands%20to%20diagnose%20the%20failure%3A%3C%2FP%3E%3CP%3EGet-RdsDiagnosticActivities%20-ActivityId%3C%2FP%3E%3CP%3EAt%20line%3A1%20char%3A1%3C%2FP%3E%3CP%3E%2B%20Remove-RdsSessionHost%20-TenantName%20%22MonsterRDSTest%22%20-HostPoolName%20%22Tes%20...%3C%2FP%3E%3CP%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20CategoryInfo%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20FromStdErr%3A%20(Microsoft.RDInf...eRdsSessionHost%3ARemoveRdsSessionHost)%20%5BRemove-RdsSessionHost%5D%2C%20RdsPowerShellException%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20FullyQualifiedErrorId%20%3A%20DefaultNoRdsError%2CMicrosoft.RDInfra.RDPowershell.SessionHost.RemoveRdsSessionHost%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFiddler%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDELETE%20%2FRdsManagement%2FV1%2FTenantGroups%2FDefault%2520Tenant%2520Group%2FTenants%2FMonsterRDSTest%2FHostPools%2FTestWin2008Pool%2FSessionHosts%2FRDSTEST-2012-1.eu.global.ad%3FForce%3DFalse%20HTTP%2F1.1%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHTTP%2F1.1%20404%20Not%20Found%3C%2FP%3E%3CP%3EThe%20resource%20you%20are%20looking%20for%20has%20been%20removed%2C%20had%20its%20name%20changed%2C%20or%20is%20temporarily%20unavailable.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBen%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-775303%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-775303%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346445%22%20target%3D%22_blank%22%3E%40Ben79%3C%2FA%3E%26nbsp%3B%3A%20No%20worries.%20Also%2C%20if%20you%20would%20like%20to%20keep%20the%20tenant%20name%20and%20host%20pool%20names%20confidential%2C%20feel%20free%20to%20send%20in%20a%20private%20message.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20you%20run%20the%20Remove%20cmdlet%2C%20I%20noticed%20you're%20not%20using%20the%20%22-Force%22%20parameter.%20Does%20it%20immediately%20fail%3F%20Can%20you%20try%20running%20it%20with%20the%20%22-Force%22%20parameter%2C%20as%20well%3F%20If%20that%20works%20only%20with%20the%20%22-Force%22%20parameter%2C%20then%20we%20either%20need%20to%20make%20it%20more%20clear%20or%20actually%20allow%20the%20operation%20with%20confirmation.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-777176%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-777176%22%20slang%3D%22en-US%22%3E%3CP%3EHey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F305776%22%20target%3D%22_blank%22%3E%40christianmontoya%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEven%20using%20the%20-force%20it%20immediately%20fails%20with%20the%20exactly%20the%20same%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBen%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-789803%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20remove%20session%20host%20%22Session%20host%20not%20found%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-789803%22%20slang%3D%22en-US%22%3E%3CP%3EDoes%20anyone%20have%20any%20ideas%20on%20this%20one%3F%20I'm%20utterly%20stuck%20and%20unable%20to%20make%20any%20more%20progress%20on%20the%20proof%20of%20concept%20of%20the%20tech.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20light%20someone%20can%20throw%20I%20would%20appreciate.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Ben79
Occasional Contributor

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

 

17 Replies

Hi @Ben79,

 

Are there any special characters in the name?

 

Could you provide the full command that you try to execute?

Does the command succeed using -Force or is the same error thrown?

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.

 

 

 

hey @anthonyschneider365, unfortunately not, the same error occurs using the -force

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.

Hi @Ben79 ,

 

Could you run a Get-RdsSessionHost for the same sessionhost? Could you post the output?

 

Thx

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.

Hi @Ben79 ,

 

Could you install Fiddler?

Then

  • close Powershell
  • start Fiddler
  • start Powershell
  • redo the Remove-RdsSessionHost
  • check the Fiddler output, looking for a call to TenantGroups/{tenantGroupName}/Tenants/{tenantName}/HostPools/{hostPoolName}/SessionHosts/{sessionHostName}

Could you share the outcome of the HTTP call?

Especially in the Inspectors, in the Response, the Raw output could be usefull

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.

 

 

@Ben79 : Did the deletion work? Can you check that the host pool exists?

hey @christianmontoya, no the deletion didn't work. The session host is still present.

 

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

Hi @christianmontoya ,

 

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? 

Hello @michawets @christianmontoya 

 

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

 

 

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

Hey @christianmontoya 

 

Even using the -force it immediately fails with the exactly the same error.

 

Thanks

 

Ben

 

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

 

Related Conversations
Extentions Synchronization
Deleted in Discussions on
3 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies