Home

Change the user assignment in personal host pool

%3CLINGO-SUB%20id%3D%22lingo-sub-958877%22%20slang%3D%22en-US%22%3EChange%20the%20user%20assignment%20in%20personal%20host%20pool%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-958877%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20community%2C%3C%2FP%3E%3CP%3EI%20created%20host%20pool%20as%20Personal%20type.%26nbsp%3BWe%20can%20know%20the%20assignment%20between%20a%20user%20and%20a%20host%20with%20commandlet%20%22Get-RdsSessionHost%22%2C%20but%20I%20can't%20change%20the%20assignment%20with%20%22Set-RdsSessionHost%22.%3C%2FP%3E%3CP%3EI%20want%20to%20pair%20a%20user%20with%20a%20host%20I%20intend.%20How%20can%20I%20do%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-961556%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20the%20user%20assignment%20in%20personal%20host%20pool%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-961556%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F418532%22%20target%3D%22_blank%22%3E%40Koshinaga%3C%2FA%3E%26nbsp%3BIf%20you%20want%20to%20add%20a%20user%20to%20an%20app%20group%20in%20your%20host%20pool%2C%20use%20following%20powershell%20command%3A%3C%2FP%3E%3CP%3EAdd-RdsAppGroupUser%20-TenantName%20%3CTENANTNAME%3E%20-HostPoolName%20%3CHOSTPOOLNAME%3E%20-AppGroupName%20%26lt%3B%22appgroupname%22%26gt%3B%20-UserPrincipalName%20%3CUSERPRINCIPALNAME%3E%3C%2FUSERPRINCIPALNAME%3E%3C%2FHOSTPOOLNAME%3E%3C%2FTENANTNAME%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-962068%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20the%20user%20assignment%20in%20personal%20host%20pool%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-962068%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F418672%22%20target%3D%22_blank%22%3E%40Luis_Farinango%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20for%20my%20poor%20explanation.%3C%2FP%3E%3CP%3EApp%20group%20is%20already%20configured%2C%20and%20users%20can%20connect%20the%20WVD%20hosts.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20are%202%20hosts%2C%20WVD-0%20and%20WVD-1(host%20names).%20When%20User0%20use%20WVD%2C%20always%20connect%20with%20WVD-1.%20And%20when%20User1%20use%20WVD%2C%20always%20connect%20with%20WVD-0.%3C%2FP%3E%3CP%3EWe%20can%20know%20the%20pairing%20with%20the%20following%20Powershell%20commandlet.%3C%2FP%3E%3CP%3EGet-RdsSessionHost%20-TenantName%20%3CTENANTNAME%3E%20-HostPoolName%20%26lt%3B%22hostpoolname%22%26gt%3B%20%7C%20select%20SessionHostName%2CAssignedUser%26nbsp%3B%3C%2FTENANTNAME%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20pairing%20was%20set%20automatically%20in%20the%20first%20connect%2C%20but%20I%20want%20to%20let%20User0%20connect%20with%20WVD-0%20host.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-962164%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20the%20user%20assignment%20in%20personal%20host%20pool%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-962164%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F418532%22%20target%3D%22_blank%22%3E%40Koshinaga%3C%2FA%3E%26nbsp%3BOh%20okay%2C%20what%20you%20can%20do%20is%20sign%20off%20the%20user%20(User0)%20from%20WVD-01%20when%20the%20user%20is%20in%20the%20session.%20Then%20set%20the%20AllowNewSession%20for%20the%20WVD-01%20to%20%24false%20so%20that%20your%20user%20does%20not%20connect%20to%20WVD-01%20anymore%20when%20he%20logs%20back%20in.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20change%20the%20allownewsession%20setting%20with%20following%20command%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22hljs-pscommand%22%3ESet-RdsSessionHost%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-TenantName%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E%22contoso%22%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-HostPoolName%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E%22contosoHostPool%22%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-Name%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E%22sh1.contoso.com%22%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-AllowNewSession%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-literal%22%3E%24false%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Koshinaga
New Contributor

Hi community,

I created host pool as Personal type. We can know the assignment between a user and a host with commandlet "Get-RdsSessionHost", but I can't change the assignment with "Set-RdsSessionHost".

I want to pair a user with a host I intend. How can I do?

3 Replies

@Koshinaga If you want to add a user to an app group in your host pool, use following powershell command:

Add-RdsAppGroupUser -TenantName <tenantname> -HostPoolName <hostpoolname> -AppGroupName <"appgroupname"> -UserPrincipalName <userprincipalname>

@Luis_Farinango 

 

Sorry for my poor explanation.

App group is already configured, and users can connect the WVD hosts.

 

There are 2 hosts, WVD-0 and WVD-1(host names). When User0 use WVD, always connect with WVD-1. And when User1 use WVD, always connect with WVD-0.

We can know the pairing with the following Powershell commandlet.

Get-RdsSessionHost -TenantName <tenantname> -HostPoolName <"hostpoolname"> | select SessionHostName,AssignedUser 

 

The pairing was set automatically in the first connect, but I want to let User0 connect with WVD-0 host.

 

@Koshinaga Oh okay, what you can do is sign off the user (User0) from WVD-01 when the user is in the session. Then set the AllowNewSession for the WVD-01 to $false so that your user does not connect to WVD-01 anymore when he logs back in.

 

You can change the allownewsession setting with following command: 

Set-RdsSessionHost -TenantName "contoso" -HostPoolName "contosoHostPool" -Name "sh1.contoso.com" -AllowNewSession $false

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